coppermind 0.1.7 → 3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e780b9df5b646be666f8b4c4d1a5b58e4557a65b3da8af83356463bdb33565d2
4
- data.tar.gz: 7a4fc57dba3a099eb017cab5e322d9a5200eb573157f8dc78b673df35c38d134
3
+ metadata.gz: 393ec09024ed0c443ec7b0167ec9694f68c43dc74de6f448f492070598541bef
4
+ data.tar.gz: 34280e1f8cd8508b67e52bfb017c1e092bd6b5bfe8d34f8ed6cf0b88b8d5f173
5
5
  SHA512:
6
- metadata.gz: a6b7c991fc27984248b0797711f19e1d5a3de9227581a97bf070a0db7d113cd1fcdf741dcd6615f1348d5080d3c5861471ab0b770c76f49161721e744191e742
7
- data.tar.gz: cf9017dbbf2da40758d167590c5cd20e4d9b3fb1f027d6a1b3f18a6796f6d61ee0e9b841bd75cd9bbfd98c6a607d4d5ecf09c956d3f349f1593a812fc9ebdcf9
6
+ metadata.gz: 6316cf97bf0e3a16c28a869d5008dde10572a7db281357ba5305247766fbe20f9ba94362a58c5a9654c57149c477ce30f33cc9c965e298f72f73f5a5aa2f74ed
7
+ data.tar.gz: adf2651d86f50ba27fd2a08e3c9769891fea9562386f5933024ec1c3ec2deed5ecf919aeb68c75c98713457b591c32cf327752c7a8d500262e1e3b62f82910c7
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Jesse Williamson
4
+ Copyright (c) 2021 Song-Zi Vong
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # Coppermind
2
+
3
+ Coppermind is *a one-column minimal responsive Jekyll blog theme*.
4
+
5
+ ## Why Another Jekyll Theme?
6
+
7
+ The modern web is bloated and disorganised. Pages load slowly and require large, resource-hungry web browsers to acess them. The machines and networks of years ago would be entirely adequate today if the programs they run were better optimised. This project seeks to provide a simple, low-dependency framework for creation of static sites.
8
+
9
+ ## About
10
+
11
+ This project:
12
+
13
+ - Is built as a theme for [Jekyll](https://jekyllrb.com)
14
+ - Was created as a fork of [Monophase](https://github.com/whk-io/monophase) with additional features, fixes, and customisations
15
+
16
+ ## Installation and Initial Setup
17
+
18
+ ### Adding the gem
19
+
20
+
21
+ Add this line to your Jekyll site's `Gemfile`:
22
+
23
+ ```ruby
24
+ gem "coppermind"
25
+ ```
26
+
27
+ And add this line to your Jekyll site's `_config.yml`:
28
+
29
+ ```yaml
30
+ theme: coppermind
31
+ ```
32
+
33
+ And then execute:
34
+
35
+ ```shell
36
+ bundle
37
+ ```
38
+
39
+ Or install it yourself as:
40
+
41
+ ```shell
42
+ gem install coppermind
43
+ ```
44
+
45
+ ### The navigation bar and homepage
46
+
47
+ Before the site is fully functional, you will need to add an index.html file and navigation bar config files.
48
+
49
+ ```html
50
+ <!-- index.html -->
51
+
52
+ ---
53
+ layout: home
54
+ ---
55
+ ```
56
+
57
+ To set up the navigation bar you need to specify titles and URLs in the file `_data/navigation.yml`. For example, the following will give you a navbar with an *about* page and three archive pages.
58
+
59
+ ```yml
60
+ - title: About
61
+ url: /about/
62
+ - title: Archive
63
+ url: /archive/
64
+ - title: Categories
65
+ url: /categories/
66
+ ```
67
+
68
+ You will also need to add markdown files corresponding to these links in the site's root directory:
69
+
70
+ ```md
71
+ <!-- about.md -->
72
+
73
+ ---
74
+ layout: page
75
+ title: About
76
+ permalink: /about/
77
+ ---
78
+
79
+ some text
80
+ ```
81
+
82
+ ```md
83
+ <!-- categories.md -->
84
+
85
+ ---
86
+ layout: archive
87
+ type: categories
88
+ title: Categories
89
+ permalink: /categories/
90
+ ---
91
+ ```
92
+
93
+ ```md
94
+ <!-- tags.md -->
95
+
96
+ ---
97
+ layout: archive
98
+ type: tags
99
+ title: Tags
100
+ permalink: /tags/
101
+ ---
102
+ ```
103
+
104
+ ```md
105
+ <!-- years.md -->
106
+
107
+ ---
108
+ layout: archive
109
+ type: years
110
+ title: Years
111
+ permalink: /years/
112
+ ---
113
+ ```
114
+
115
+ ## Customisation
116
+
117
+ ### Config.yml options
118
+ In addition to the standard Jekyll config.yml settings, Coppermind supports the following:
119
+
120
+ | Variable | Type | Default | Specification |
121
+ | -------- | ---- | ------- | ------------- |
122
+ | `paginate` | int | --- | The number of posts to include on the homepage |
123
+ | `title` | String | --- | The title of the website |
124
+ | `tagline` | String | --- | The tagline of the website |
125
+ | `lang` | String | `en` | The language of pages; The value can be overwritten by the `lang` variable on each page |
126
+ | `author.name` | String | --- | The name of the website author |
127
+ | `author.url` | String | --- | A URL of the website author |
128
+ | `tags_path` | String | --- | A path to the archive-by-tags page; It is used by tags on each post |
129
+ | `categories_path` | String | --- | A path to the archive-by-categories page; It is used by categories on each post |
130
+
131
+ The default config is shown below:
132
+
133
+ ```md
134
+ <!-- config.yml -->
135
+
136
+ title: Coppermind
137
+ tagline: Your tagline here
138
+ author:
139
+ name: Author
140
+
141
+ # Build settings
142
+ markdown: kramdown
143
+ plugins:
144
+ - jekyll-feed
145
+ - jekyll-paginate
146
+ - jekyll-seo-tag
147
+ - kramdown-parser-gfm
148
+
149
+ paginate: 2
150
+
151
+ tags_path: /tags/
152
+ categories_path: /categories/
153
+ ```
154
+
155
+ ### Page frontmatter
156
+
157
+ In addition to the standard Jekyll frontmatter configuration, Coppermind supports the following:
158
+
159
+ | Variable | Type | Default | Specification |
160
+ | -------- | ---- | ------- | ------------- |
161
+ | `description` | String | --- | A description of the current post |
162
+ | `last_modified_at` | String | --- | The date of the last modification you made on a post after its publishing |
163
+ | `author` | String or Array | --- | The author name(s) of the post |
164
+ | `comments` | Boolean | `true` | Does enable the Disqus comment system |
165
+ | `math` | Boolean | `false` | Does enable MathJax on this page |
166
+
167
+ A sample post is shown below:
168
+
169
+ ```md
170
+ <!-- 2021-10-09-welcome-to-jekyll.markdown -->
171
+
172
+ ---
173
+ layout: post
174
+ title: "Welcome to Jekyll!"
175
+ date: 2021-10-09 11:25:13 +1100
176
+ categories: jekyll update
177
+ tags: jekyll
178
+ ---
179
+
180
+ some text
181
+ ```
182
+
183
+ ### Homepage
184
+
185
+ You can customise the homepage by setting `layout: home` in the frontmatter in an `index.html` file in the base directory.
186
+
187
+ ### Custom Head
188
+
189
+ Coppermind leaves a placeholder to allow inserting custom HTML into the page head. HTML code in `_includes/custom-head.html` will be automatically included in `<head>`.
190
+
191
+ ### Alert Messages
192
+
193
+ Coppermind provides some predefined classes to specify different levels of **alert messages**. In order of tone from light to heavy, they are: `message-info`, `message-warning`, and `message-danger`. You may add it to single elements like a `<p>`, or to a parent if there are multiple elements to show.
194
+
195
+ ### Alignment
196
+
197
+ Coppermind also provides some predefined classes to specify the alignment of HTML elements—e.g. images. They are `align-center`, `align-left`, and `align-right`.
198
+
199
+
200
+ ## Development
201
+
202
+ To set up your environment to develop this theme, run `bundle install`. This theme is setup just like a normal Jekyll site with various filler files for testing. To test the theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
203
+
204
+ When a new gem version is released, only the files in specified in the gemspec regexp and tracked with Git will be bundled.
205
+
206
+ ## License
207
+
208
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml ADDED
@@ -0,0 +1,17 @@
1
+ title: Coppermind
2
+ tagline: Your tagline here
3
+ author:
4
+ name: Author
5
+
6
+ # Build settings
7
+ markdown: kramdown
8
+ plugins:
9
+ - jekyll-feed
10
+ - jekyll-paginate
11
+ - jekyll-seo-tag
12
+ - kramdown-parser-gfm
13
+
14
+ paginate: 2
15
+
16
+ tags_path: /tags/
17
+ categories_path: /categories/
@@ -0,0 +1,71 @@
1
+ {%- if page.type == 'categories' -%}
2
+ {%- assign taxonomies = site.categories -%}
3
+ {%- elsif page.type == 'tags' -%}
4
+ {%- assign taxonomies = site.tags -%}
5
+ {%- else -%}
6
+ {%- assign taxonomies = none -%}
7
+ {%- endif -%}
8
+
9
+ {%- assign max_count = 0 -%}
10
+ {%- for taxonomy in taxonomies -%}
11
+ {%- assign posts = taxonomy[1] -%}
12
+ {%- if posts.size > max_count -%}
13
+ {%- assign max_count = posts.size -%}
14
+ {%- endif -%}
15
+ {%- endfor -%}
16
+
17
+ <div class="taxonomies-wrapper">
18
+ <ul class="taxonomies">
19
+ {%- for i in (1..max_count) reversed -%}
20
+ {%- for taxonomy in taxonomies -%}
21
+ {%- assign taxonomy_name = taxonomy[0] -%}
22
+ {%- assign slugified_taxonomy_name = taxonomy_name | slugify -%}
23
+ {%- assign posts = taxonomy[1] -%}
24
+ {%- if posts.size == i -%}
25
+ <li>
26
+ {%- capture link -%}{{ page.permalink }}#{{ slugified_taxonomy_name }}{%- endcapture -%}
27
+ <a class="taxonomy" href="{{ link | relative_url }}">
28
+ <span>
29
+ {%- if page.type == 'tags' -%}
30
+ {{ slugified_taxonomy_name }}
31
+ {%- else -%}
32
+ {{ taxonomy_name }}
33
+ {%- endif -%}
34
+ </span>
35
+ <span class="taxonomy-count">{{ posts.size }}</span>
36
+ </a>
37
+ </li>
38
+ {%- endif -%}
39
+ {%- endfor -%}
40
+ {%- endfor -%}
41
+ </ul>
42
+ </div>
43
+
44
+ {%- for i in (1..max_count) reversed -%}
45
+ {%- for taxonomy in taxonomies -%}
46
+ {%- assign taxonomy_name = taxonomy[0] -%}
47
+ {%- assign slugified_taxonomy_name = taxonomy_name | slugify -%}
48
+ {%- assign posts = taxonomy[1] -%}
49
+ {%- if posts.size == i -%}
50
+ <h2 id="{{ slugified_taxonomy_name }}">
51
+ {%- if page.type == 'tags' -%}
52
+ {{ slugified_taxonomy_name }}
53
+ {%- else -%}
54
+ {{ taxonomy_name }}
55
+ {%- endif -%}
56
+ </h2>
57
+ <ul class="post-list-by-taxonomy">
58
+ {%- for post in posts -%}
59
+ <li>
60
+ <time datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
61
+ &raquo;
62
+ <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
63
+ </li>
64
+ {%- endfor -%}
65
+ </ul>
66
+ <a href="#" onclick="backToTop()" class="back-to-top">^</a>
67
+ {%- endif -%}
68
+ {%- endfor -%}
69
+ {%- endfor -%}
70
+
71
+ {% include back-to-top.html %}
@@ -0,0 +1,32 @@
1
+ {% assign taxonomies = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
2
+
3
+ <div class="taxonomies-wrapper">
4
+ <ul class="taxonomies">
5
+ {%- for taxonomy in taxonomies -%}
6
+ <li>
7
+ {%- capture link -%}{{ page.permalink }}#{{ taxonomy.name }}{%- endcapture -%}
8
+ <a class="taxonomy" href="{{ link | relative_url }}">
9
+ <span>{{ taxonomy.name }}</span>
10
+ <span class="taxonomy-count">{{ taxonomy.size }}</span>
11
+ </a>
12
+ </li>
13
+ {%- endfor -%}
14
+ </ul>
15
+ </div>
16
+
17
+ {%- for taxonomy in taxonomies -%}
18
+ <h2 id="{{ taxonomy.name }}">{{ taxonomy.name }}</h2>
19
+ <ul class="post-list-by-taxonomy">
20
+ {%- assign posts = taxonomy.items -%}
21
+ {%- for post in posts -%}
22
+ <li>
23
+ <time datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
24
+ &raquo;
25
+ <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
26
+ </li>
27
+ {%- endfor -%}
28
+ </ul>
29
+ <a href="#" onclick="backToTop()" class="back-to-top">^</a>
30
+ {%- endfor -%}
31
+
32
+ {% include back-to-top.html %}
@@ -0,0 +1,6 @@
1
+ <script>
2
+ function backToTop() {
3
+ const main = document.getElementById("site-main");
4
+ main.scrollTop = 0;
5
+ }
6
+ </script>
@@ -0,0 +1,6 @@
1
+ {% comment %}
2
+ Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:
3
+
4
+ 1. Head over to https://realfavicongenerator.net/ to add your own favicons.
5
+ 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
6
+ {% endcomment %}
@@ -0,0 +1,17 @@
1
+ <div id="disqus_thread"></div>
2
+ <script>
3
+ var disqus_config = function () {
4
+ this.page.url = '{{ page.url | absolute_url }}';
5
+ this.page.identifier = '{{ page.url | absolute_url }}';
6
+ };
7
+
8
+ (function() {
9
+ var d = document, s = d.createElement('script');
10
+
11
+ s.src = 'https://{{ site.disqus }}.disqus.com/embed.js';
12
+
13
+ s.setAttribute('data-timestamp', +new Date());
14
+ (d.head || d.body).appendChild(s);
15
+ })();
16
+ </script>
17
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
@@ -0,0 +1,39 @@
1
+ <footer class="footer">
2
+ <div class="footer-column">
3
+ <p>
4
+ <small>
5
+ &copy;&nbsp;
6
+ {%- assign date_from = site.posts[-1].date | date_to_xmlschema -%}
7
+ {%- assign year_from = date_from | date: '%Y' -%}
8
+ {%- assign date_to = site.time | date_to_xmlschema -%}
9
+ {%- assign year_to = date_to | date: '%Y' -%}
10
+ {%- unless year_from == nil or year_from == year_to -%}
11
+ <time datetime="{{ date_from }}">{{ year_from }}</time>-
12
+ {%- endunless -%}
13
+ <time datetime="{{ date_to }}">{{ year_to }}</time>
14
+ {%- if site.author -%}
15
+ &nbsp;<a href="{{ site.author.url }}" target="_blank">{{ site.author.name }}</a>
16
+ {%- endif -%}
17
+ . All right reserved.
18
+ </small>
19
+ </p>
20
+ <p>
21
+ <small>
22
+ Powered by <a href="https://github.com/JustSoval/Coppermind" target="_blank">Coppermind</a>
23
+ </small>
24
+ </p>
25
+ </div>
26
+ {% if site.data.social %}
27
+ <div class="footer-column">
28
+ <ul class="social-icons">
29
+ {% for social in site.data.social %}
30
+ <li class="social-icon-item">
31
+ <a class="social-icon" href="{{ social.url }}" target="_blank">
32
+ <i class="{{ social.icon | default: 'fas fa-link' }}" title="{{ social.title }}"></i>
33
+ </a>
34
+ </li>
35
+ {% endfor %}
36
+ </ul>
37
+ </div>
38
+ {% endif %}
39
+ </footer>
@@ -0,0 +1,9 @@
1
+ <!-- Global site tag (gtag.js) - Google Analytics -->
2
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
3
+ <script>
4
+ window.dataLayer = window.dataLayer || [];
5
+ function gtag(){dataLayer.push(arguments);}
6
+ gtag('js', new Date());
7
+
8
+ gtag('config', '{{ site.google_analytics }}');
9
+ </script>
@@ -0,0 +1,13 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <link rel="stylesheet" href="{{ 'assets/normalize.css' | relative_url }}">
5
+ <link rel="stylesheet" href="{{ 'assets/open-color.css' | relative_url }}">
6
+ <link rel="stylesheet" href="{{ 'assets/monophase/styles.css' | relative_url }}">
7
+ {% feed_meta %}
8
+ {% seo %}
9
+
10
+ <script async src="https://use.fontawesome.com/releases/v5.0.12/js/all.js"></script>
11
+
12
+ {% include custom-head.html %}
13
+ </head>
@@ -0,0 +1,20 @@
1
+ <header class="masthead">
2
+ <div class="masthead-title">
3
+ <a href="{{ '/' | relative_url }}" title="Home">{{ site.title }}</a>
4
+ <small class="tagline">{{ site.tagline }}</small>
5
+ </div>
6
+
7
+ {% if site.data.navigation %}
8
+ <nav class="nav">
9
+ <ul class="nav-list">
10
+ {% for item in site.data.navigation %}
11
+ <li class="nav-item">
12
+ <a href="{{ item.url | relative_url }}" class="{% if page.url == item.url %}current{% endif %}">
13
+ {{ item.title }}
14
+ </a>
15
+ </li>
16
+ {% endfor %}
17
+ </ul>
18
+ </nav>
19
+ {% endif %}
20
+ </header>
@@ -0,0 +1,2 @@
1
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
2
+ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article>
6
+ <h1>{{ page.title }}</h1>
7
+
8
+ {{ content }}
9
+
10
+ {% if page.type == "years" %}
11
+ {% include archive-by-years.html %}
12
+ {% else %}
13
+ {% include archive-by-tagories.html %}
14
+ {% endif %}
15
+ </article>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3
+ {% include head.html %}
4
+ <body>
5
+ <div class="container">
6
+ {% include header.html %}
7
+
8
+ <main>
9
+ {{ content }}
10
+ </main>
11
+
12
+ {% include footer.html %}
13
+ </div>
14
+
15
+ {% if page.math %}
16
+ {% include mathjax.html %}
17
+ {% endif %}
18
+
19
+ {% if jekyll.environment == 'production' and site.google_analytics %}
20
+ {% include google-analytics.html %}
21
+ {% endif %}
22
+ </body>
23
+ </html>
@@ -0,0 +1,44 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="posts">
6
+ {% assign posts = site.posts %}
7
+ {% if paginator %}
8
+ {% assign posts = paginator.posts %}
9
+ {% endif %}
10
+ {% for post in posts %}
11
+ <div class="post">
12
+ <h2 class="post-title">
13
+ <a href="{{ post.url | relative_url }}">
14
+ {{ post.title }}
15
+ </a>
16
+ </h2>
17
+
18
+ <time datetime="{{ post.date | date_to_xmlschema }}" class="post-meta">{{ post.date | date_to_string }}</time>
19
+
20
+ <p class="post-excerpt">
21
+ {% if post.description %}
22
+ {{ post.description | strip_html }}
23
+ {% else %}
24
+ {{ post.excerpt | strip_html }}
25
+ {% endif %}
26
+ </p>
27
+ </div>
28
+ {% endfor %}
29
+ </div>
30
+
31
+ {% if paginator %}
32
+ <div class="pagination">
33
+ {% if paginator.next_page %}
34
+ <a class="pagination-item older" href="{{ paginator.next_page_path | relative_url }}">Older</a>
35
+ {% else %}
36
+ <span class="pagination-item older">Older</span>
37
+ {% endif %}
38
+ {% if paginator.previous_page %}
39
+ <a class="pagination-item newer" href="{{ paginator.previous_page_path | relative_url }}">Newer</a>
40
+ {% else %}
41
+ <span class="pagination-item newer">Newer</span>
42
+ {% endif %}
43
+ </div>
44
+ {% endif %}
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="page">
6
+ <h1 class="page-title">{{ page.title }}</h1>
7
+ {{ content }}
8
+ </article>
@@ -0,0 +1,86 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="post">
6
+ <h1 class="post-title">{{ page.title }}</h1>
7
+ <div class="post-meta">
8
+ <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
9
+ {{ page.date | date_to_string }}
10
+ </time>
11
+ {%- if page.last_modified_at -%}
12
+ <span> ~ </span>
13
+ {%- assign mdate = page.last_modified_at | date_to_xmlschema -%}
14
+ <time datetime="{{ mdate }}" itemprop="dateModified">
15
+ {{ mdate | date_to_string }}
16
+ </time>
17
+ {%- endif -%}
18
+ {%- if page.author -%}
19
+ <span> • </span>
20
+ {% for author in page.author %}
21
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
22
+ {{ author }}
23
+ </span>
24
+ {%- if forloop.last == false %}, {% endif -%}
25
+ {% endfor %}
26
+ {%- endif -%}
27
+ {% if page.categories.size > 0 %}
28
+ <span> • </span>
29
+ <span class="post-categories-section">
30
+ <i class="post-categories-icon fas fa-folder"></i>
31
+ <ul class="post-categories">
32
+ {%- for category in page.categories -%}
33
+ <li>
34
+ {% assign slugified_category = category | slugify %}
35
+ {%- if site.categories_path -%}
36
+ <a class="post-category" href="{{ site.categories_path | relative_url }}#{{ slugified_category }}">{{ category }}</a>
37
+ {%- else -%}
38
+ <span class="post-category">{{ category }}</span>
39
+ {%- endif -%}
40
+ </li>
41
+ {%- endfor -%}
42
+ </ul>
43
+ </span>
44
+ {% endif %}
45
+ {% if page.tags.size > 0 %}
46
+ <span> • </span>
47
+ <span class="post-tags-section">
48
+ <i class="post-tags-icon fas fa-tag"></i>
49
+ <ul class="post-tags">
50
+ {%- for tag in page.tags -%}
51
+ <li>
52
+ {% assign slugified_tag = tag | slugify %}
53
+ {%- if site.tags_path -%}
54
+ <a class="post-tag" href="{{ site.tags_path | relative_url }}#{{ slugified_tag }}">{{ slugified_tag }}</a>
55
+ {%- else -%}
56
+ <span class="post-tag">{{ slugified_tag }}</span>
57
+ {%- endif -%}
58
+ </li>
59
+ {%- endfor -%}
60
+ </ul>
61
+ </span>
62
+ {% endif %}
63
+ </div>
64
+
65
+ {{ content }}
66
+
67
+ {% if jekyll.environment == "production" and site.disqus and page.comments != false %}
68
+ {% include disqus.html %}
69
+ {% endif %}
70
+ </article>
71
+
72
+ {% if site.related_posts != empty %}
73
+ <aside class="related">
74
+ <h2 class="related-title">Related posts</h2>
75
+ <ul class="related-posts">
76
+ {% for post in site.related_posts limit:3 %}
77
+ <li>
78
+ <a href="{{ post.url | relative_url }}">
79
+ {{ post.title }}
80
+ </a>
81
+ <small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></small>
82
+ </li>
83
+ {% endfor %}
84
+ </ul>
85
+ </aside>
86
+ {% endif %}