jekyll-theme-fermi 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5325f34bb848259bd629b531c8b766f6e564dde2fabb92e86008bc5ebe086038
4
+ data.tar.gz: 190492b52ed43ddcfe80566acd22fe8e9233ff3b33dc0a2d490f33a6d606b949
5
+ SHA512:
6
+ metadata.gz: dbeddeaa696f9a6e2705f4b6b18b86494a06441064396fb11af23a60e4bfa22f4af49c33c15c6b24a7a29a637e5ae3a00d3e56a7965fd3bcc292bfd3432eb326
7
+ data.tar.gz: fddc7a0611642df0b0148e94f6796be9f031f7733b0b3ef18fcd27933a372a3317a814247d21097466e156b7a385f1a9f6e3a7fc57ccafe386b53c9ec5397eb3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 v4vong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,168 @@
1
+ # Fermi <!-- omit in toc -->
2
+
3
+ A simple and pragmatic Jekyll theme for blog.
4
+
5
+ ![screenshot](screenshot.jpg)
6
+
7
+ ## Highlight Features <!-- omit in toc -->
8
+
9
+ - Support the CSS resets [Normalize](https://github.com/necolas/normalize.css)
10
+ - Support [Font Awesome](https://fontawesome.com/)
11
+ - Support [MathJax](https://www.mathjax.org/)
12
+ - Support [Disqus](https://disqus.com/)
13
+ - Support [Google Analytics 4](https://analytics.google.com/analytics/web/)
14
+ - Support the pagination, via [`jekyll-paginate`](https://github.com/jekyll/jekyll-paginate)
15
+ - Light and dark mode, via [`prefers-color-scheme`](https://web.dev/prefers-color-scheme/)
16
+ - Archive pages implemented in pure [Liquid](https://shopify.github.io/liquid/)
17
+
18
+ ## Table of Contents <!-- omit in toc -->
19
+
20
+ - [Installation](#installation)
21
+ - [Usage](#usage)
22
+ - [Specifying the Page Language](#specifying-the-page-language)
23
+ - [Customizing the Head](#customizing-the-head)
24
+ - [Navigation](#navigation)
25
+ - [Social Links](#social-links)
26
+ - [Archive Pages](#archive-pages)
27
+ - [MathJax](#mathjax)
28
+ - [Disqus](#disqus)
29
+ - [Google Analytics 4](#google-analytics-4)
30
+ - [More Customization](#more-customization)
31
+ - [Contributing](#contributing)
32
+ - [Development](#development)
33
+ - [License](#license)
34
+
35
+ ## Installation
36
+
37
+ Add this line to your Jekyll site's `Gemfile`:
38
+
39
+ ```ruby
40
+ gem "jekyll-theme-fermi"
41
+ ```
42
+
43
+ And add this line to your Jekyll site's `_config.yml`:
44
+
45
+ ```yaml
46
+ theme: jekyll-theme-fermi
47
+ ```
48
+
49
+ And then execute:
50
+
51
+ $ bundle
52
+
53
+ Or install it yourself as:
54
+
55
+ $ gem install jekyll-theme-fermi
56
+
57
+ ## Usage
58
+
59
+ The Fermi theme is easy to use. You just need to refer to the demo's [`_config.yml`](https://github.com/v4vong/jekyll-theme-fermi/blob/gh-pages/_config.yml) file, modify some properties and you can use it immediately.
60
+
61
+ ### Specifying the Page Language
62
+
63
+ You can specify the language on each page by setting the `lang` property. If the property is not set, the `site.lang` would be referred. If the `site.lang` is not set, the default value `en` would be applied.
64
+
65
+ ### Customizing the Head
66
+
67
+ If you want to put more data into the `<head>`, you don't need to copy the whole `_includes/head.html` file from this repo and overwrite it in your repo. You just need to create a `_includes/custom-head.html` file in your repo, and put some data into there. These data will be automatically imported into the `<head>`.
68
+
69
+ ### Navigation
70
+
71
+ The navigation in Fermi is very easy to configure, just specify the titles and URLs in the [`_data/navigation.yml`](https://github.com/v4vong/jekyll-theme-fermi/blob/gh-pages/_data/navigation.yml) file, for example,
72
+
73
+ ```yml
74
+ - title: Home
75
+ url: /
76
+ - title: About
77
+ url: /about.html
78
+ - title: Archive
79
+ url: /archive.html
80
+ ```
81
+
82
+ ### Social Links
83
+
84
+ The social links in Fermi is also very easy to connfigure. You don't need to import any large SVG file to render the icons because Fermi supports the [Font Awesome](https://fontawesome.com/). Specify the titles, URLs, and icons in the [`_data/social.yml`](https://github.com/v4vong/jekyll-theme-fermi/blob/gh-pages/_data/social.yml) file, for example,
85
+
86
+ ```yml
87
+ - title: Email
88
+ url: mailto:v4vong@gmail.com
89
+ icon: fas fa-envelope
90
+ - title: Twitter
91
+ url: https://twitter.com/v4vong
92
+ icon: fab fa-twitter
93
+ - title: GitHub
94
+ url: https://github.com/v4vong
95
+ icon: fab fa-github
96
+ ```
97
+
98
+ ### Archive Pages
99
+
100
+ Fermi provides a template `archive` to archive posts by years, categories, or tags.
101
+
102
+ If you want to show an archive page of years, just create a file and put these front matter in it:
103
+
104
+ ```yml
105
+ ---
106
+ layout: archive
107
+ type: years
108
+ title: Archive by Years
109
+ ---
110
+ ```
111
+
112
+ Similarly, if you want to show an archive page of categories, just create a file and put these front matter in it:
113
+
114
+ ```yml
115
+ ---
116
+ layout: archive
117
+ type: categories
118
+ title: Archive by Categories
119
+ ---
120
+ ```
121
+
122
+ Besides, if you want the categories and tags displayed in the post to link to the archive pages, you need to configure the paths to the category and tag archive pages in the `_config.yml` file, for example:
123
+
124
+ ```yml
125
+ categories_path: /categories/
126
+ tags_path: /tags/
127
+ ```
128
+
129
+ ### MathJax
130
+
131
+ Fermi relies on the [MathJax](https://www.mathjax.org/) to render math. The MathJax is disabled by default. You need to set `math: true` on the page where you want to enable the MathJax.
132
+
133
+ ### Disqus
134
+
135
+ To enable [Disqus](https://disqus.com/), just set the [Disqus shortname](https://help.disqus.com/en/articles/1717111-what-s-a-shortname) in the `_config.yml`, for example,
136
+
137
+ ```yml
138
+ disqus: <your disqus shortname>
139
+ ```
140
+
141
+ ### Google Analytics 4
142
+
143
+ Fermi support the [Google Analytics 4](https://support.google.com/analytics/answer/10089681). To enable it, just set the Measurement ID in the `_config.yml`, for example,
144
+
145
+ ```yml
146
+ google_analytics: G-XXXXXXXXXX
147
+ ```
148
+
149
+ ### More Customization
150
+
151
+ You can easily modify some styles of this theme, such as colors and fonts. You don't have to copy a lot of CSS into your repository, just copy [`_sass/fermi/_variables.scss`](_sass/fermi/_variables.scss) and change the variable value.
152
+
153
+ ## Contributing
154
+
155
+ Bug reports and pull requests are welcome on GitHub at https://github.com/v4vong/jekyll-theme-fermi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
156
+
157
+ ## Development
158
+
159
+ To set up your environment to develop this theme, run `bundle install`.
160
+
161
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
162
+
163
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
164
+ To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-fermi.gemspec` accordingly.
165
+
166
+ ## License
167
+
168
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,66 @@
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
+ <ul class="taxonomies">
18
+ {%- for i in (1..max_count) reversed -%}
19
+ {%- for taxonomy in taxonomies -%}
20
+ {%- assign taxonomy_name = taxonomy[0] -%}
21
+ {%- assign slugified_taxonomy_name = taxonomy_name | slugify -%}
22
+ {%- assign posts = taxonomy[1] -%}
23
+ {%- if posts.size == i -%}
24
+ <li>
25
+ {%- capture link -%}{{ page.permalink }}#{{ slugified_taxonomy_name }}{%- endcapture -%}
26
+ <a class="taxonomy" href="{{ link | relative_url }}">
27
+ <span>
28
+ {%- if page.type == 'tags' -%}
29
+ {{ slugified_taxonomy_name }}
30
+ {%- else -%}
31
+ {{ taxonomy_name }}
32
+ {%- endif -%}
33
+ </span>
34
+ <span>{{ posts.size }}</span>
35
+ </a>
36
+ </li>
37
+ {%- endif -%}
38
+ {%- endfor -%}
39
+ {%- endfor -%}
40
+ </ul>
41
+
42
+ {%- for i in (1..max_count) reversed -%}
43
+ {%- for taxonomy in taxonomies -%}
44
+ {%- assign taxonomy_name = taxonomy[0] -%}
45
+ {%- assign slugified_taxonomy_name = taxonomy_name | slugify -%}
46
+ {%- assign posts = taxonomy[1] -%}
47
+ {%- if posts.size == i -%}
48
+ <h2 id="{{ slugified_taxonomy_name }}">
49
+ {%- if page.type == 'tags' -%}
50
+ {{ slugified_taxonomy_name }}
51
+ {%- else -%}
52
+ {{ taxonomy_name }}
53
+ {%- endif -%}
54
+ </h2>
55
+ <ul>
56
+ {%- for post in posts -%}
57
+ <li>
58
+ <time class="archive-date" datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
59
+ &raquo;
60
+ <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
61
+ </li>
62
+ {%- endfor -%}
63
+ </ul>
64
+ {%- endif -%}
65
+ {%- endfor -%}
66
+ {%- endfor -%}
@@ -0,0 +1,27 @@
1
+ {% assign taxonomies = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
2
+
3
+ <ul class="taxonomies">
4
+ {%- for taxonomy in taxonomies -%}
5
+ <li>
6
+ {%- capture link -%}{{ page.permalink }}#{{ taxonomy.name }}{%- endcapture -%}
7
+ <a class="taxonomy" href="{{ link | relative_url }}">
8
+ <span>{{ taxonomy.name }}</span>
9
+ <span>{{ taxonomy.size }}</span>
10
+ </a>
11
+ </li>
12
+ {%- endfor -%}
13
+ </ul>
14
+
15
+ {%- for taxonomy in taxonomies -%}
16
+ <h2 id="{{ taxonomy.name }}">{{ taxonomy.name }}</h2>
17
+ <ul>
18
+ {%- assign posts = taxonomy.items -%}
19
+ {%- for post in posts -%}
20
+ <li>
21
+ <time class="archive-date" datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
22
+ &raquo;
23
+ <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
24
+ </li>
25
+ {%- endfor -%}
26
+ </ul>
27
+ {%- endfor -%}
@@ -0,0 +1,3 @@
1
+ {% comment %}
2
+ A placeholder for customizing head.
3
+ {% 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,26 @@
1
+ <footer class="footer">
2
+ {% if site.data.social %}
3
+ <ul class="social">
4
+ {% for social in site.data.social %}
5
+ <li class="social-item">
6
+ <a href="{{ social.url }}" target="_blank">
7
+ <i class="{{ social.icon | default: 'fas fa-link' }}" title="{{ social.title }}"></i>
8
+ </a>
9
+ </li>
10
+ {% endfor %}
11
+ </ul>
12
+ {% endif %}
13
+
14
+ <div class="footer-bottom">
15
+ <p class="copyright">
16
+ &copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>
17
+ {%- if site.author -%}
18
+ &nbsp;<a href="{{ site.author.url }}" target="_blank">{{ site.author.name }}</a>
19
+ {%- endif -%}. All rights reserved.
20
+ </p>
21
+
22
+ <p class="power">
23
+ Powered by <a href="https://jekyllrb.com/" target="_blank">Jekyll</a> & <a href="https://github.com/v4vong/jekyll-theme-fermi" target="_blank">Fermi</a>
24
+ </p>
25
+ </div>
26
+ </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,12 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
4
+
5
+ <link rel="stylesheet" href="{{ 'assets/css/normalize.css' | relative_url }}"/>
6
+ <link rel="stylesheet" href="{{ 'assets/css/open-color.css' | relative_url }}"/>
7
+ <link rel="stylesheet" href="{{ 'assets/css/fermi/styles.css' | relative_url }}"/>
8
+
9
+ <script async src="https://use.fontawesome.com/releases/v6.0.0/js/all.js"></script>
10
+
11
+ {% include custom-head.html %}
12
+ </head>
@@ -0,0 +1,22 @@
1
+ <header class="masthead">
2
+ <h3 class="masthead-title">
3
+ <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
4
+ </h3>
5
+ {% if site.tagline %}
6
+ <h5 class="masthead-tagline">{{ site.tagline }}</h5>
7
+ {% endif %}
8
+
9
+ {% if site.data.navigation %}
10
+ <nav class="nav">
11
+ <ul class="nav-list">
12
+ {% for item in site.data.navigation %}
13
+ <li class="nav-item">
14
+ <a class="{% if page.url == item.url %}active{% endif %}" href="{{ item.url | relative_url }}">
15
+ {{ item.title }}
16
+ </a>
17
+ </li>
18
+ {% endfor %}
19
+ </ul>
20
+ </nav>
21
+ {% endif %}
22
+ </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,37 @@
1
+ {% assign posts = site.posts %}
2
+ {% if paginator %}
3
+ {% assign posts = paginator.posts %}
4
+ {% endif %}
5
+ {% for post in posts %}
6
+ <article class="post-card">
7
+ {% if post.image %}
8
+ <a class="post-card-image-link" href="{{ post.url | relative_url }}">
9
+ <div class="post-card-image" style="background-image: url({{ post.image | relative_url }})"></div>
10
+ </a>
11
+ {% endif %}
12
+ <div class="post-card-content {% unless post.image %}no-cover{% endunless %}">
13
+ <a class="post-card-content-link" href="{{ post.url | relative_url }}">
14
+ <header class="post-card-header">
15
+ {% if post.categories.size > 0 %}
16
+ <span class="post-card-category">{{ post.categories[0] }}</span>
17
+ {% endif %}
18
+ <h2 class="post-card-title">{{ post.title }}</h2>
19
+ </header>
20
+ <section class="post-card-excerpt">
21
+ {% if post.description %}
22
+ <p>{{ post.description | truncate: 100 }}</p>
23
+ {% elsif post.excerpt %}
24
+ <p>{{ post.excerpt | strip_html | truncate: 100 }}</p>
25
+ {% else %}
26
+ <p>{{ post.content | strip_html | truncate: 100 }}</p>
27
+ {% endif %}
28
+ </section>
29
+ </a>
30
+ <footer class="post-card-meta">
31
+ <time datetime="{{ post.date | date_to_xmlschema }}">
32
+ <i class="fa-solid fa-calendar-days"></i> {{ post.date | date_to_string }}
33
+ </time>
34
+ </footer>
35
+ </div>
36
+ </article>
37
+ {% endfor %}
@@ -0,0 +1,72 @@
1
+ {% assign have_related = false %}
2
+
3
+ {%- for post in site.posts -%}
4
+ {%- if post.url != page.url -%}
5
+
6
+ {%- for tag in post.tags -%}
7
+ {%- if page.tags contains tag -%}
8
+ {%- assign have_related = true -%}
9
+ {%- break -%}
10
+ {%- endif -%}
11
+ {%- endfor -%}
12
+
13
+ {%- if have_related == false -%}
14
+ {%- for category in post.categories -%}
15
+ {%- if page.categories contains category -%}
16
+ {%- assign have_related = true -%}
17
+ {%- break -%}
18
+ {%- endif -%}
19
+ {%- endfor -%}
20
+ {%- endif -%}
21
+
22
+ {%- endif -%}
23
+ {%- endfor -%}
24
+
25
+
26
+ {%- if have_related -%}
27
+
28
+ {%- assign related = false -%}
29
+ {%- assign related_count = 0 -%}
30
+ {%- assign related_max = 5 -%}
31
+
32
+ <aside class="related">
33
+ <h3>Related Posts</h3>
34
+ <ul class="related-posts">
35
+ {%- for post in site.posts -%}
36
+ {%- if post.url != page.url -%}
37
+
38
+ {%- for tag in post.tags -%}
39
+ {%- if page.tags contains tag -%}
40
+ {%- assign related = true -%}
41
+ {%- break -%}
42
+ {%- endif -%}
43
+ {%- endfor -%}
44
+
45
+ {%- if related == false -%}
46
+ {%- for category in post.categories -%}
47
+ {%- if page.categories contains category -%}
48
+ {%- assign related = true -%}
49
+ {%- break -%}
50
+ {%- endif -%}
51
+ {%- endfor -%}
52
+ {%- endif -%}
53
+
54
+ {%- if related -%}
55
+ <li>
56
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
57
+ <small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></small>
58
+ </li>
59
+ {%- assign related_count = related_count | plus: 1 -%}
60
+ {%- assign related = false -%}
61
+ {%- endif -%}
62
+
63
+ {%- if related_count >= related_max -%}
64
+ {%- break -%}
65
+ {%- endif -%}
66
+
67
+ {%- endif -%}
68
+ {%- endfor -%}
69
+ </ul>
70
+ </aside>
71
+
72
+ {%- endif -%}
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ {{ content }}
6
+
7
+ {% if page.type == "years" %}
8
+ {% include archive-by-years.html %}
9
+ {% else %}
10
+ {% include archive-by-tagories.html %}
11
+ {% endif %}
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+ <div class="body-container">
8
+ <div class="wrapper">
9
+
10
+ {% include header.html %}
11
+
12
+ <main>
13
+ {{ content }}
14
+ </main>
15
+
16
+ {% include footer.html %}
17
+
18
+ </div>
19
+ </div>
20
+
21
+ {% if page.math %}
22
+ {% include mathjax.html %}
23
+ {% endif %}
24
+
25
+ {% if jekyll.environment == 'production' and site.google_analytics %}
26
+ {% include google-analytics.html %}
27
+ {% endif %}
28
+
29
+ </body>
30
+ </html>
@@ -0,0 +1,35 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="post-feed">
6
+
7
+ {% include post-cards.html %}
8
+
9
+ </div>
10
+
11
+ {% if paginator.total_pages > 1 %}
12
+ <div class="pagination">
13
+ {% if paginator.previous_page %}
14
+ <a class="pagination-item prev" href="{{ paginator.previous_page_path | relative_url }}">&laquo;</a>
15
+ {% else %}
16
+ <span class="pagination-item prev">&laquo;</span>
17
+ {% endif %}
18
+
19
+ {% for page in (1..paginator.total_pages) %}
20
+ {% if page == paginator.page %}
21
+ <em class="pagination-item">{{ page }}</em>
22
+ {% elsif page == 1 %}
23
+ <a class="pagination-item" href="{{ '/' | relative_url }}">{{ page }}</a>
24
+ {% else %}
25
+ <a class="pagination-item" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a>
26
+ {% endif %}
27
+ {% endfor %}
28
+
29
+ {% if paginator.next_page %}
30
+ <a class="pagination-item next" href="{{ paginator.next_page_path | relative_url }}">&raquo;</a>
31
+ {% else %}
32
+ <span class="pagination-item next">&raquo;</span>
33
+ {% endif %}
34
+ </div>
35
+ {% endif %}
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="page">
6
+ <h1 class="page-title">{{ page.title }}</h1>
7
+ <div class="page-content">
8
+ {{ content }}
9
+ </div>
10
+ </article>
@@ -0,0 +1,74 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="post">
6
+ <div class="post-meta post-meta-top">
7
+ <div class="post-category">
8
+ {% if page.categories.size > 0 %}
9
+ {% assign category = page.categories[0] %}
10
+ <i class="fa-solid fa-folder"></i>
11
+ {% if site.categories_path %}
12
+ <a href="{{ site.categories_path | relative_url }}#{{ category | slugify }}">{{ category }}</a>
13
+ {% else %}
14
+ <span>{{ category }}</span>
15
+ {% endif %}
16
+ {% endif %}
17
+ </div>
18
+
19
+ <div class="post-time-author">
20
+ <time datetime="{{ page.date | date_to_xmlschema }}">
21
+ <i class="fa-solid fa-calendar-days"></i> {{ page.date | date_to_string }}
22
+ </time>
23
+ {%- if page.last_modified_at -%}
24
+ ~
25
+ {%- assign mdate = page.last_modified_at | date_to_xmlschema -%}
26
+ <time datetime="{{ mdate }}" itemprop="dateModified">
27
+ {{ mdate | date_to_string }}
28
+ </time>
29
+ {%- endif -%}
30
+ {%- if page.author -%}
31
+ <i class="fa-solid fa-at"></i>
32
+ {% for author in page.author %}
33
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">{{ author }}</span>
34
+ {%- if forloop.last == false %}, {% endif -%}
35
+ {% endfor %}
36
+ {%- endif -%}
37
+ </div>
38
+ </div>
39
+
40
+ <h1 class="post-title">{{ page.title }}</h1>
41
+
42
+ {% if page.image %}
43
+ <figure class="post-cover" style="background-image: url({{ page.image | relative_url }})">
44
+ </figure>
45
+ {% endif %}
46
+
47
+ <div class="post-content">
48
+ {{ content }}
49
+ </div>
50
+
51
+ {% if page.tags.size > 0 %}
52
+ <nav class="post-meta post-meta-bottom">
53
+ <i class="fa-solid fa-tags"></i>
54
+ {% for tag in page.tags %}
55
+ {% assign slugified_tag = tag | slugify %}
56
+ {% if site.tags_path %}
57
+ <a class="post-tag" href="{{ site.tags_path | relative_url }}#{{ slugified_tag }}">{{ slugified_tag }}</a>
58
+ {% else %}
59
+ <span class="post-tag">{{ slugified_tag }}</span>
60
+ {% endif %}
61
+ {% endfor %}
62
+ </nav>
63
+ {% endif %}
64
+ </article>
65
+
66
+ {% include related-posts.html %}
67
+
68
+ {% if jekyll.environment == "production" and site.disqus and page.comments != false %}
69
+ <aside class="post-comments">
70
+
71
+ {% include disqus.html %}
72
+
73
+ </aside>
74
+ {% endif %}