jasper2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +113 -0
- data/_data/authors.yml +76 -0
- data/_data/tags.yml +16 -0
- data/_includes/analytics.html +11 -0
- data/_includes/author_pagination.html +13 -0
- data/_includes/dynamic_tag_info.html +8 -0
- data/_includes/dynamic_title.html +16 -0
- data/_includes/facebook.html +1 -0
- data/_includes/floating-header.html +28 -0
- data/_includes/ghost-logo.html +1 -0
- data/_includes/head.html +69 -0
- data/_includes/infinity.html +1 -0
- data/_includes/location.html +1 -0
- data/_includes/navigation.html +6 -0
- data/_includes/page-scripts.html +6 -0
- data/_includes/point.html +3 -0
- data/_includes/post-card-error.html +59 -0
- data/_includes/post-card-next.html +53 -0
- data/_includes/post-card-previous.html +53 -0
- data/_includes/post-card.html +55 -0
- data/_includes/post-scripts.html +63 -0
- data/_includes/post_pagination.html +13 -0
- data/_includes/rss.html +1 -0
- data/_includes/site-nav.html +27 -0
- data/_includes/subscribe-form.html +9 -0
- data/_includes/tag_pagination.html +13 -0
- data/_includes/twitter.html +1 -0
- data/_includes/website.html +1 -0
- data/_layouts/author.html +64 -0
- data/_layouts/default.html +139 -0
- data/_layouts/error.html +1 -0
- data/_layouts/feed.xml +113 -0
- data/_layouts/page.html +48 -0
- data/_layouts/post.html +196 -0
- data/_layouts/tag.html +42 -0
- data/_plugins/jekyll-autgenerator.rb +76 -0
- data/_plugins/jekyll-capitalize-all.rb +11 -0
- data/_plugins/jekyll-tagsgenerator.rb +70 -0
- data/_posts/1863-11-19-gettysburg-address.md +18 -0
- data/_posts/1865-11-26-down-the-rabbit-hole.md +62 -0
- data/_posts/1871-03-18-looking-glass-house.md +41 -0
- data/_posts/1912-07-24-out-to-sea.md +88 -0
- data/_posts/1948-12-12-the-purpose-of-education.md +26 -0
- data/_posts/1963-08-28-i-have-a-dream.md +103 -0
- data/_posts/2012-09-01-a-full-and-comprehensive-style-test.html +424 -0
- data/_posts/2014-08-12-the-businessman-and-fisherman.md +48 -0
- data/_posts/2017-07-27-advanced-markdown.html +57 -0
- data/_posts/2017-07-27-managing-users.html +24 -0
- data/_posts/2017-07-27-private-sites.html +19 -0
- data/_posts/2017-07-27-the-editor.html +55 -0
- data/_posts/2017-07-27-themes.html +30 -0
- data/_posts/2017-07-27-using-tags.html +41 -0
- data/_posts/2017-07-27-welcome.md +28 -0
- data/about/index.md +17 -0
- data/assets/built/global.css +2 -0
- data/assets/built/global.css.map +1 -0
- data/assets/built/screen.css +2 -0
- data/assets/built/screen.css.map +1 -0
- data/assets/built/screen.edited.css +2 -0
- data/assets/built/screen.edited.css.map +1 -0
- data/assets/built/syntax.css +2 -0
- data/assets/built/syntax.css.map +1 -0
- data/assets/css/.csscomb.json +237 -0
- data/assets/css/csscomb.json +240 -0
- data/assets/css/global.css +491 -0
- data/assets/css/screen.css +1928 -0
- data/assets/css/screen.edited.css +152 -0
- data/assets/css/syntax.css +66 -0
- data/assets/images/abraham.jpg +0 -0
- data/assets/images/advanced.jpg +0 -0
- data/assets/images/bear.jpg +0 -0
- data/assets/images/blog-cover.jpg +0 -0
- data/assets/images/blog-icon.png +0 -0
- data/assets/images/bus.jpg +0 -0
- data/assets/images/design.jpg +0 -0
- data/assets/images/edgar.gif +0 -0
- data/assets/images/fables.jpg +0 -0
- data/assets/images/favicon.png +0 -0
- data/assets/images/ghost-logo.svg +1 -0
- data/assets/images/ghost.png +0 -0
- data/assets/images/grapes.jpg +0 -0
- data/assets/images/hannah-cover.jpg +0 -0
- data/assets/images/hannah.jpg +0 -0
- data/assets/images/john.jpg +0 -0
- data/assets/images/lewis.jpeg +0 -0
- data/assets/images/locked.jpg +0 -0
- data/assets/images/martin.jpg +0 -0
- data/assets/images/piano.jpg +0 -0
- data/assets/images/sky.jpg +0 -0
- data/assets/images/speeches.jpg +0 -0
- data/assets/images/summit.jpg +0 -0
- data/assets/images/tags.jpg +0 -0
- data/assets/images/team.jpg +0 -0
- data/assets/images/water.jpg +0 -0
- data/assets/images/waves.jpg +0 -0
- data/assets/images/welcome.jpg +0 -0
- data/assets/images/writing.jpg +0 -0
- data/assets/js/infinitescroll.js +83 -0
- data/assets/js/jquery.fitvids.js +89 -0
- data/assets/screenshot-desktop.jpg +0 -0
- data/assets/screenshot-mobile.jpg +0 -0
- metadata +222 -0
data/_layouts/error.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ content }}
|
data/_layouts/feed.xml
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: null
|
|
3
|
+
---
|
|
4
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
5
|
+
{% if page.xsl %}
|
|
6
|
+
<?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?>
|
|
7
|
+
{% endif %}
|
|
8
|
+
<feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
|
|
9
|
+
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
|
|
10
|
+
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
|
|
11
|
+
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
|
|
12
|
+
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
|
13
|
+
<id>{{ page.url | absolute_url | xml_escape }}</id>
|
|
14
|
+
|
|
15
|
+
{% assign title = site.title | default: site.name %}
|
|
16
|
+
{% if page.collection != "posts" %}
|
|
17
|
+
{% assign collection = page.collection | capitalize %}
|
|
18
|
+
{% assign title = title | append: " | " | append: collection %}
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% if page.category %}
|
|
21
|
+
{% assign category = page.category | capitalize %}
|
|
22
|
+
{% assign title = title | append: " | " | append: category %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% if title %}
|
|
26
|
+
<title type="html">{{ title | smartify | xml_escape }}</title>
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
{% if site.description %}
|
|
30
|
+
<subtitle>{{ site.description | xml_escape }}</subtitle>
|
|
31
|
+
{% endif %}
|
|
32
|
+
|
|
33
|
+
{% if site.author %}
|
|
34
|
+
<author>
|
|
35
|
+
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
|
|
36
|
+
{% if site.author.email %}
|
|
37
|
+
<email>{{ site.author.email | xml_escape }}</email>
|
|
38
|
+
{% endif %}
|
|
39
|
+
{% if site.author.uri %}
|
|
40
|
+
<uri>{{ site.author.uri | xml_escape }}</uri>
|
|
41
|
+
{% endif %}
|
|
42
|
+
</author>
|
|
43
|
+
{% endif %}
|
|
44
|
+
|
|
45
|
+
{% if site.data.authors %}
|
|
46
|
+
{% for author in site.data.authors %}
|
|
47
|
+
{% if author[1].username == post.author %}
|
|
48
|
+
<author>{{ author[1].name | strip_html }}</author>
|
|
49
|
+
<author>
|
|
50
|
+
<name>{{ author[1].name | default: author[1].name | xml_escape }}</name>
|
|
51
|
+
{% if author[1].email %}
|
|
52
|
+
<email>{{ author[1].email | xml_escape }}</email>
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% if author[1].uri %}
|
|
55
|
+
<uri>{{ author[1].uri | xml_escape }}</uri>
|
|
56
|
+
{% endif %}
|
|
57
|
+
</author>
|
|
58
|
+
{% endif %}
|
|
59
|
+
{% endfor %}
|
|
60
|
+
{% endif %}
|
|
61
|
+
|
|
62
|
+
{% assign posts = page.posts %}
|
|
63
|
+
{% if page.category %}
|
|
64
|
+
{% assign posts = posts | where: "category",page.category %}
|
|
65
|
+
{% endif %}
|
|
66
|
+
|
|
67
|
+
{% for post in posts limit: 10 %}
|
|
68
|
+
<entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
|
|
69
|
+
<title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
|
|
70
|
+
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
|
|
71
|
+
<published>{{ post.date | date_to_xmlschema }}</published>
|
|
72
|
+
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
|
|
73
|
+
<id>{{ post.id | absolute_url | xml_escape }}</id>
|
|
74
|
+
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
|
|
75
|
+
|
|
76
|
+
{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
|
|
77
|
+
{% assign post_author = site.data.authors[post_author] | default: post_author %}
|
|
78
|
+
{% assign post_author_email = post_author.email | default: nil %}
|
|
79
|
+
{% assign post_author_uri = post_author.uri | default: nil %}
|
|
80
|
+
{% assign post_author_name = post_author.name | default: post_author %}
|
|
81
|
+
|
|
82
|
+
<author>
|
|
83
|
+
<name>{{ post_author_name | default: "" | xml_escape }}</name>
|
|
84
|
+
{% if post_author_email %}
|
|
85
|
+
<email>{{ post_author_email | xml_escape }}</email>
|
|
86
|
+
{% endif %}
|
|
87
|
+
{% if post_author_uri %}
|
|
88
|
+
<uri>{{ post_author_uri | xml_escape }}</uri>
|
|
89
|
+
{% endif %}
|
|
90
|
+
</author>
|
|
91
|
+
|
|
92
|
+
{% if post.category %}
|
|
93
|
+
<category term="{{ post.category | xml_escape }}" />
|
|
94
|
+
{% endif %}
|
|
95
|
+
|
|
96
|
+
{% for tag in post.tags %}
|
|
97
|
+
<category term="{{ tag | xml_escape }}" />
|
|
98
|
+
{% endfor %}
|
|
99
|
+
|
|
100
|
+
{% if post.excerpt and post.excerpt != empty %}
|
|
101
|
+
<summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
|
|
102
|
+
{% endif %}
|
|
103
|
+
|
|
104
|
+
{% assign post_image = post.image.path | default: post.image %}
|
|
105
|
+
{% if post_image %}
|
|
106
|
+
{% unless post_image contains "://" %}
|
|
107
|
+
{% assign post_image = post_image | absolute_url %}
|
|
108
|
+
{% endunless %}
|
|
109
|
+
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image | xml_escape }}" />
|
|
110
|
+
{% endif %}
|
|
111
|
+
</entry>
|
|
112
|
+
{% endfor %}
|
|
113
|
+
</feed>
|
data/_layouts/page.html
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
current: page
|
|
4
|
+
class: page-template
|
|
5
|
+
disqus: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- < default -->
|
|
9
|
+
<!-- The tag above means: insert everything in this file
|
|
10
|
+
into the {body} of the default.hbs template -->
|
|
11
|
+
|
|
12
|
+
<!-- The big featured header, it uses blog cover image as a BG if available -->
|
|
13
|
+
<header class="site-header outer">
|
|
14
|
+
<div class="inner">
|
|
15
|
+
{% include site-nav.html %}
|
|
16
|
+
</div>
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<!-- Everything inside the #post tags pulls data from the post -->
|
|
20
|
+
<!-- #post -->
|
|
21
|
+
|
|
22
|
+
<main id="site-main" class="site-main outer" role="main">
|
|
23
|
+
<div class="inner">
|
|
24
|
+
|
|
25
|
+
<article class="post-full {% if page.tags.size > 0 %}{% for tag in page.tags %} tag-{{ tag | slugify: "latin" }}{% endfor %}{% endif %} {{ page.subclass }} {% unless page.cover %}no-image{% endunless %}">
|
|
26
|
+
|
|
27
|
+
<header class="post-full-header">
|
|
28
|
+
<h1 class="post-full-title">{{ page.title }}</h1>
|
|
29
|
+
</header>
|
|
30
|
+
|
|
31
|
+
{% if page.cover %}
|
|
32
|
+
<figure class="post-full-image" style="background-image: url({{ site.baseurl }}{{ page.cover }})">
|
|
33
|
+
</figure>
|
|
34
|
+
{% endif %}
|
|
35
|
+
|
|
36
|
+
<section class="post-full-content">
|
|
37
|
+
{{ content }}
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
</article>
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
</main>
|
|
44
|
+
|
|
45
|
+
<!-- /post -->
|
|
46
|
+
|
|
47
|
+
<!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs -->
|
|
48
|
+
{% include page-scripts.html %}
|
data/_layouts/post.html
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
current: post
|
|
4
|
+
class: post-template
|
|
5
|
+
disqus: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- default -->
|
|
9
|
+
|
|
10
|
+
<!-- The tag above means: insert everything in this file
|
|
11
|
+
into the {body} of the default.hbs template -->
|
|
12
|
+
|
|
13
|
+
<header class="site-header outer">
|
|
14
|
+
<div class="inner">
|
|
15
|
+
{% include site-nav.html %}
|
|
16
|
+
</div>
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<!-- Everything inside the #post tags pulls data from the post -->
|
|
20
|
+
<!-- #post -->
|
|
21
|
+
|
|
22
|
+
<main id="site-main" class="site-main outer" role="main">
|
|
23
|
+
<div class="inner">
|
|
24
|
+
|
|
25
|
+
<article class="post-full {% if page.tags.size > 0 %}{% for tag in page.tags %} tag-{{ tag | slugify: "latin" }}{% endfor %}{% endif %} {{ page.subclass }} {% unless page.cover %}no-image{% endunless %}">
|
|
26
|
+
|
|
27
|
+
<header class="post-full-header">
|
|
28
|
+
<section class="post-full-meta">
|
|
29
|
+
<time class="post-full-meta-date" datetime="{{ page.date | date:'%e %B %Y' }}">{{ page.date | date:'%e %B %Y' }}</time>
|
|
30
|
+
{% if page.tags.size > 0 %}
|
|
31
|
+
<span class="date-divider">/</span>
|
|
32
|
+
{% for tag in page.tags %}
|
|
33
|
+
{% if forloop.index == page.tags.size %}
|
|
34
|
+
<a href='{{ site.baseurl }}tag/{{ tag | slugify: "latin" }}/'>{{ tag | upcase }}</a>
|
|
35
|
+
{% else %}
|
|
36
|
+
<a href='{{ site.baseurl }}tag/{{ tag | slugify: "latin" }}/'>{{ tag | upcase }}</a>,
|
|
37
|
+
{% endif %}
|
|
38
|
+
{% endfor %}
|
|
39
|
+
{% endif %}
|
|
40
|
+
</section>
|
|
41
|
+
<h1 class="post-full-title">{{ page.title }}</h1>
|
|
42
|
+
</header>
|
|
43
|
+
|
|
44
|
+
{% if page.cover %}
|
|
45
|
+
<figure class="post-full-image" style="background-image: url({{ site.baseurl }}{{ page.cover }})">
|
|
46
|
+
</figure>
|
|
47
|
+
{% endif %}
|
|
48
|
+
|
|
49
|
+
<section class="post-full-content">
|
|
50
|
+
<div class="kg-card-markdown">
|
|
51
|
+
{{ content }}
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
54
|
+
|
|
55
|
+
<!-- Email subscribe form at the bottom of the page -->
|
|
56
|
+
{% if site.subscribers %}
|
|
57
|
+
<section class="subscribe-form">
|
|
58
|
+
<h3 class="subscribe-form-title">Subscribe to {{ site.title }}</h3>
|
|
59
|
+
<p>Get the latest posts delivered right to your inbox</p>
|
|
60
|
+
{% include subscribe-form.html placeholder="youremail@example.com" %}
|
|
61
|
+
</section>
|
|
62
|
+
{% endif %}
|
|
63
|
+
|
|
64
|
+
<footer class="post-full-footer">
|
|
65
|
+
<!-- Everything inside the #author tags pulls data from the author -->
|
|
66
|
+
<!-- #author-->
|
|
67
|
+
{% for author in site.data.authors %}
|
|
68
|
+
{% if author[1].username == page.author %}
|
|
69
|
+
<section class="author-card">
|
|
70
|
+
{% if author[1].picture %}
|
|
71
|
+
<img class="author-profile-image" src="{{ site.baseurl }}{{ author[1].picture }}" alt="{{ page.author }}" />
|
|
72
|
+
{% endif %}
|
|
73
|
+
<section class="author-card-content">
|
|
74
|
+
<h4 class="author-card-name"><a href="{{ site.baseurl }}author/{{ page.author }}">{{ author[1].name }}</a></h4>
|
|
75
|
+
{% if author[1].bio %}
|
|
76
|
+
<p>{{ author[1].bio }}</p>
|
|
77
|
+
{% else %}
|
|
78
|
+
<p>Read <a href="{{ site.baseurl }}author/{{ page.author }}">more posts</a> by this author.</p>
|
|
79
|
+
{% endif %}
|
|
80
|
+
</section>
|
|
81
|
+
</section>
|
|
82
|
+
<div class="post-full-footer-right">
|
|
83
|
+
<a class="author-card-button" href="{{ site.baseurl }}author/{{ page.author }}">Read More</a>
|
|
84
|
+
</div>
|
|
85
|
+
{% endif %}
|
|
86
|
+
{% endfor %}
|
|
87
|
+
<!-- /author -->
|
|
88
|
+
</footer>
|
|
89
|
+
|
|
90
|
+
<!-- If you use Disqus comments, just uncomment this block.
|
|
91
|
+
The only thing you need to change is "test-apkdzgmqhj" - which
|
|
92
|
+
should be replaced with your own Disqus site-id. -->
|
|
93
|
+
{% if site.disqus or page.disqus %}
|
|
94
|
+
<section class="post-full-comments">
|
|
95
|
+
<div id="disqus_thread"></div>
|
|
96
|
+
<script>
|
|
97
|
+
var disqus_config = function () {
|
|
98
|
+
this.page.url = '{{ site.url }}{{ page.url }}';
|
|
99
|
+
this.page.identifier = '{{ page.id }}';
|
|
100
|
+
this.page.title = '{{ page.title }}';
|
|
101
|
+
};
|
|
102
|
+
(function() {
|
|
103
|
+
var d = document, s = d.createElement('script');
|
|
104
|
+
s.src = 'https://{{ site.disqus_shortname }}.disqus.com/embed.js';
|
|
105
|
+
s.setAttribute('data-timestamp', +new Date());
|
|
106
|
+
(d.head || d.body).appendChild(s);
|
|
107
|
+
})();
|
|
108
|
+
</script>
|
|
109
|
+
</section>
|
|
110
|
+
{% endif %}
|
|
111
|
+
|
|
112
|
+
</article>
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
</main>
|
|
116
|
+
|
|
117
|
+
<!-- Links to Previous/Next posts -->
|
|
118
|
+
<aside class="read-next outer">
|
|
119
|
+
<div class="inner">
|
|
120
|
+
<div class="read-next-feed">
|
|
121
|
+
{% if page.tags.size > 0 %}
|
|
122
|
+
{% assign primary = page.tags | first %}
|
|
123
|
+
{% assign related_posts = 0 %}
|
|
124
|
+
{% for post in site.posts %}
|
|
125
|
+
{% if post.tags.size > 0 %}
|
|
126
|
+
{% if post.tags contains primary %}
|
|
127
|
+
{% assign related_posts = related_posts | plus: 1 %}
|
|
128
|
+
{% endif %}
|
|
129
|
+
{% endif %}
|
|
130
|
+
{% endfor %}
|
|
131
|
+
{% if related_posts > 1 %}
|
|
132
|
+
<article class="read-next-card"
|
|
133
|
+
{% if site.cover %}
|
|
134
|
+
style="background-image: url({{ site.baseurl }}{{ site.cover }})"
|
|
135
|
+
{% else %}
|
|
136
|
+
{% if page.cover %}
|
|
137
|
+
style="background-image: url(url({{ site.baseurl }}{{ page.cover }})"{% endif %}
|
|
138
|
+
{% endif %}
|
|
139
|
+
>
|
|
140
|
+
<header class="read-next-card-header">
|
|
141
|
+
<small class="read-next-card-header-sitetitle">— {{ site.title }} —</small>
|
|
142
|
+
{% if primary %}
|
|
143
|
+
<h3 class="read-next-card-header-title"><a href="{{ site.baseurl }}tag/{{ primary | slugify: "latin" }}/">{{ primary | capitalize }}</a></h3>
|
|
144
|
+
{% endif %}
|
|
145
|
+
</header>
|
|
146
|
+
<div class="read-next-divider">{% include infinity.html %}</div>
|
|
147
|
+
<div class="read-next-card-content">
|
|
148
|
+
<ul>
|
|
149
|
+
{% assign count = 0 %}
|
|
150
|
+
{% for post in site.posts %}
|
|
151
|
+
{% if post.tags contains primary %}
|
|
152
|
+
{% if post.title != page.title %}
|
|
153
|
+
{% assign count = count | plus: 1 %}
|
|
154
|
+
{% if count <= 3 %}
|
|
155
|
+
<li><a href="{{ site.baseurl }}{{ post.url | remove_first: '/' }}">{{ post.title }}</a></li>
|
|
156
|
+
{% endif %}
|
|
157
|
+
{% endif %}
|
|
158
|
+
{% endif %}
|
|
159
|
+
{% endfor %}
|
|
160
|
+
</ul>
|
|
161
|
+
</div>
|
|
162
|
+
<footer class="read-next-card-footer">
|
|
163
|
+
<a href="{{ site.baseurl }}tag/{{ primary | slugify: "latin" }}/">
|
|
164
|
+
{% if related_posts > 1 %}
|
|
165
|
+
See all {{ related_posts | minus: 1 }} posts →
|
|
166
|
+
{% elsif related_posts == 1 %}
|
|
167
|
+
{{ related_posts }} post →
|
|
168
|
+
{% else %}
|
|
169
|
+
No posts.
|
|
170
|
+
{% endif %}
|
|
171
|
+
</a>
|
|
172
|
+
</footer>
|
|
173
|
+
</article>
|
|
174
|
+
{% endif %}
|
|
175
|
+
{% endif %}
|
|
176
|
+
|
|
177
|
+
<!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs -->
|
|
178
|
+
{% if page.next %}
|
|
179
|
+
{% include post-card-next.html %}
|
|
180
|
+
{% endif %}
|
|
181
|
+
|
|
182
|
+
<!-- If there's a previous post, display it using the same markup included from - partials/post-card.hbs -->
|
|
183
|
+
{% if page.previous %}
|
|
184
|
+
{% include post-card-previous.html %}
|
|
185
|
+
{% endif %}
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</aside>
|
|
190
|
+
|
|
191
|
+
<!-- Floating header which appears on-scroll, included from includes/floating-header.hbs -->
|
|
192
|
+
{% include floating-header.html %}
|
|
193
|
+
|
|
194
|
+
<!-- /post -->
|
|
195
|
+
|
|
196
|
+
<!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs -->
|
data/_layouts/tag.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
current: tag
|
|
4
|
+
title: Tag Page
|
|
5
|
+
cover: false
|
|
6
|
+
class: 'tag-template'
|
|
7
|
+
navigation: True
|
|
8
|
+
logo: 'assets/images/ghost.png'
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!-- default -->
|
|
12
|
+
<!-- The tag above means - insert everything in this file into the {body} of the default.hbs template -->
|
|
13
|
+
|
|
14
|
+
<!-- The big featured header, it uses blog cover image as a BG if available -->
|
|
15
|
+
<!-- #tag -->
|
|
16
|
+
{% include dynamic_tag_info.html %}
|
|
17
|
+
<header class="site-header outer {% if cover or page.cover %}" style="background-image: url({{ site.baseurl }}{% if cover %}{{ cover }}{% else %}{{ page.cover }}{% endif%}) {% else %}no-cover{% endif %}">
|
|
18
|
+
<div class="inner">
|
|
19
|
+
{% include site-nav.html %}
|
|
20
|
+
<div class="site-header-content">
|
|
21
|
+
<h1 class="site-title">{{ page.tag | capitalizeall }}</h1>
|
|
22
|
+
<h2 class="site-description">
|
|
23
|
+
{% if tag_description %}
|
|
24
|
+
{{ tag_description }}
|
|
25
|
+
{% elsif page.tag %}
|
|
26
|
+
A collection of {{ paginator.total_posts }} posts
|
|
27
|
+
{% endif %}
|
|
28
|
+
</h2>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</header>
|
|
32
|
+
<!-- tag -->
|
|
33
|
+
|
|
34
|
+
<!-- The main content area -->
|
|
35
|
+
<main id="site-main" class="site-main outer" role="main">
|
|
36
|
+
<div class="inner">
|
|
37
|
+
<div class="post-feed">
|
|
38
|
+
<!-- The tag below includes the markup for each post - partials/post-card.hbs -->
|
|
39
|
+
{% include post-card.html %}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</main>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module Jekyll
|
|
2
|
+
|
|
3
|
+
class AuthorsGenerator < Generator
|
|
4
|
+
|
|
5
|
+
safe true
|
|
6
|
+
|
|
7
|
+
def generate(site)
|
|
8
|
+
site.data['authors'].each do |author, data|
|
|
9
|
+
posts = [author, posts_by_author(site, author)]
|
|
10
|
+
build_subpages(site, 'author', posts)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def build_subpages(site, type, posts)
|
|
15
|
+
posts[1] = posts[1].sort_by { |p| -p.date.to_f }
|
|
16
|
+
atomize(site, type, posts)
|
|
17
|
+
paginate(site, type, posts)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def atomize(site, type, posts)
|
|
21
|
+
path = "/author/#{posts[0]}"
|
|
22
|
+
atom = AtomPageAuthor.new(site, site.source, path, type, posts[0], posts[1])
|
|
23
|
+
site.pages << atom
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def paginate(site, type, posts)
|
|
27
|
+
pages = Jekyll::Paginate::Pager.calculate_pages(posts[1], site.config['paginate'].to_i)
|
|
28
|
+
(1..pages).each do |num_page|
|
|
29
|
+
pager = Jekyll::Paginate::Pager.new(site, num_page, posts[1], pages)
|
|
30
|
+
path = "/author/#{posts[0]}"
|
|
31
|
+
if num_page > 1
|
|
32
|
+
path = path + "/page#{num_page}"
|
|
33
|
+
end
|
|
34
|
+
newpage = GroupSubPageAuthor.new(site, site.source, path, type, posts[0])
|
|
35
|
+
newpage.pager = pager
|
|
36
|
+
site.pages << newpage
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
private
|
|
42
|
+
|
|
43
|
+
def posts_by_author(site, author)
|
|
44
|
+
site.posts.docs.select { |post| post.data['author'] == author }
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
class GroupSubPageAuthor < Page
|
|
49
|
+
def initialize(site, base, dir, type, val)
|
|
50
|
+
@site = site
|
|
51
|
+
@base = base
|
|
52
|
+
@dir = dir
|
|
53
|
+
@name = 'index.html'
|
|
54
|
+
|
|
55
|
+
self.process(@name)
|
|
56
|
+
self.read_yaml(File.join(base, '_layouts'), "author.html")
|
|
57
|
+
self.data["grouptype"] = type
|
|
58
|
+
self.data[type] = val
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class AtomPageAuthor < Page
|
|
63
|
+
def initialize(site, base, dir, type, val, posts)
|
|
64
|
+
@site = site
|
|
65
|
+
@base = base
|
|
66
|
+
@dir = dir
|
|
67
|
+
@name = 'feed.xml'
|
|
68
|
+
|
|
69
|
+
self.process(@name)
|
|
70
|
+
self.read_yaml(File.join(base, '_layouts'), "feed.xml")
|
|
71
|
+
self.data[type] = val
|
|
72
|
+
self.data["grouptype"] = type
|
|
73
|
+
self.data["posts"] = posts[0..9]
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|