coppermind 0.1.4 → 3.0

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: 27024e8c2df6b244ca07e9eddcc3c055ece8b01d2424a9f6367c61860e83f4f2
4
- data.tar.gz: bdf862486394a11532c367ac3b36f986f7fd80661fafc467b464454210fef0c2
3
+ metadata.gz: 85eb2af8f523b74584e69b1df4c2145a3141ac9e92a0f81e9230a8c8715b2290
4
+ data.tar.gz: 066c694e4aee859a795ea92834519b16fb3373a317abe026411f5bbe361f18b9
5
5
  SHA512:
6
- metadata.gz: 362ffe533cd091ca99e5d850deed9018d05d7713ab2fd635531e568967f593fe6b8ee16f37fdf9c8754e93d2603a973143626b9324914cc7333b8c807091415d
7
- data.tar.gz: f877027f76e240df797e14312ee28aefa6770bede78ee4832e9825c8532233779f1c313ba56e07e120b64040ae6717e00da3b99afc9f2bbfec7b749d02db5246
6
+ metadata.gz: 38eaee830e87288dd807a40612c482c3f1ff62219d067f0d422a8cdf74d2709cfd437511336a29a2024c6480b075332b7b521c8eb3727688061f12f3a05d6f86
7
+ data.tar.gz: 696dcb95855958c304e82a00553030cb0e688d9fac6f5d6592d528c5e3226aeb0d77aa81c02bd62251f5841ec544628e4ce85e3f5dcce1d219db648b4f08d08d
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,200 @@
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
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
+ ## Customisation
46
+
47
+ ### Customising the navigation bar
48
+
49
+ By default Coppermind includes a navigation bar with three archive pages. This is not intended to be the final configuration for all users, and is highly configurable.
50
+
51
+ To customise the navigation bar you just 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.
52
+
53
+ ```yml
54
+ - title: About
55
+ url: /about/
56
+ - title: Archive
57
+ url: /archive/
58
+ - title: Categories
59
+ url: /categories/
60
+ ```
61
+
62
+ These links correspond to markdown files in the baseurl:
63
+
64
+ ```md
65
+ <!-- about.md -->
66
+
67
+ ---
68
+ layout: page
69
+ title: About
70
+ permalink: /about/
71
+ ---
72
+
73
+ some text
74
+ ```
75
+
76
+ ```md
77
+ <!-- categories.md -->
78
+
79
+ ---
80
+ layout: archive
81
+ type: categories
82
+ title: Categories
83
+ permalink: /categories/
84
+ ---
85
+ ```
86
+
87
+ ```md
88
+ <!-- tags.md -->
89
+
90
+ ---
91
+ layout: archive
92
+ type: tags
93
+ title: Tags
94
+ permalink: /tags/
95
+ ---
96
+ ```
97
+
98
+ ```md
99
+ <!-- years.md -->
100
+
101
+ ---
102
+ layout: archive
103
+ type: years
104
+ title: Years
105
+ permalink: /years/
106
+ ---
107
+ ```
108
+
109
+ ### Config.yml options
110
+ In addition to the standard Jekyll config.yml settings, Coppermind supports the following:
111
+
112
+ | Variable | Type | Default | Specification |
113
+ | -------- | ---- | ------- | ------------- |
114
+ | `paginate` | int | --- | The number of posts to include on the homepage |
115
+ | `title` | String | --- | The title of the website |
116
+ | `tagline` | String | --- | The tagline of the website |
117
+ | `lang` | String | `en` | The language of pages; The value can be overwritten by the `lang` variable on each page |
118
+ | `author.name` | String | --- | The name of the website author |
119
+ | `author.url` | String | --- | A URL of the website author |
120
+ | `tags_path` | String | --- | A path to the archive-by-tags page; It is used by tags on each post |
121
+ | `categories_path` | String | --- | A path to the archive-by-categories page; It is used by categories on each post |
122
+
123
+ The default config is shown below:
124
+
125
+ ```md
126
+ <!-- config.yml -->
127
+
128
+ title: Coppermind
129
+ tagline: Your tagline here
130
+ author:
131
+ name: Author
132
+
133
+ # Build settings
134
+ markdown: kramdown
135
+ plugins:
136
+ - jekyll-feed
137
+ - jekyll-paginate
138
+ - jekyll-seo-tag
139
+ - kramdown-parser-gfm
140
+
141
+ paginate: 2
142
+
143
+ tags_path: /tags/
144
+ categories_path: /categories/
145
+ ```
146
+
147
+ ### Page frontmatter
148
+
149
+ In addition to the standard Jekyll frontmatter configuration, Coppermind supports the following:
150
+
151
+ | Variable | Type | Default | Specification |
152
+ | -------- | ---- | ------- | ------------- |
153
+ | `description` | String | --- | A description of the current post |
154
+ | `last_modified_at` | String | --- | The date of the last modification you made on a post after its publishing |
155
+ | `author` | String or Array | --- | The author name(s) of the post |
156
+ | `comments` | Boolean | `true` | Does enable the Disqus comment system |
157
+ | `math` | Boolean | `false` | Does enable MathJax on this page |
158
+
159
+ A sample post is shown below:
160
+
161
+ ```md
162
+ <!-- 2021-10-09-welcome-to-jekyll.markdown -->
163
+
164
+ ---
165
+ layout: post
166
+ title: "Welcome to Jekyll!"
167
+ date: 2021-10-09 11:25:13 +1100
168
+ categories: jekyll update
169
+ tags: jekyll
170
+ ---
171
+
172
+ some text
173
+ ```
174
+
175
+ ### Homepage
176
+
177
+ You can customise the homepage by setting `layout: home` in the frontmatter in an `index.html` file in the base directory.
178
+
179
+ ### Custom Head
180
+
181
+ 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>`.
182
+
183
+ ### Alert Messages
184
+
185
+ 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.
186
+
187
+ ### Alignment
188
+
189
+ 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`.
190
+
191
+
192
+ ## Development
193
+
194
+ 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`.
195
+
196
+ When a new gem version is released, only the files in specified in the gemspec regexp and tracked with Git will be bundled.
197
+
198
+ ## License
199
+
200
+ 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,8 @@
1
+ # - title: About
2
+ # url: /about/
3
+ - title: Years
4
+ url: /years/
5
+ - title: Categories
6
+ url: /categories/
7
+ - title: Tags
8
+ url: /tags/
@@ -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 %}