linus 1.0.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.txt +21 -0
- data/README.md +187 -0
- data/_config.yml +81 -0
- data/_includes/blog/categories.html +11 -0
- data/_includes/blog/post.html +89 -0
- data/_includes/footer.html +20 -0
- data/_includes/header.html +44 -0
- data/_layouts/blog.html +60 -0
- data/_layouts/default.html +49 -0
- data/_layouts/page.html +19 -0
- data/_layouts/post.html +101 -0
- data/assets/css/base.css +265 -0
- data/assets/css/fonts.css +35 -0
- data/assets/css/layout.css +360 -0
- data/assets/css/syntax.css +228 -0
- data/assets/css/theme.css +8 -0
- data/assets/fonts/atkinson.ttf +0 -0
- data/assets/fonts/atkinson.woff2 +0 -0
- data/assets/fonts/mono.ttf +0 -0
- data/assets/fonts/mono.woff2 +0 -0
- data/assets/icon.png +0 -0
- metadata +172 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 193e320f42093e015f1e04725ca843d9134167e10325e23eec7f4069b3533a8b
|
|
4
|
+
data.tar.gz: 7ba0dbbeee23fb8940ad48978641e1d42d0240c3c3014656f58a826878230dbe
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a7df689959304932e3d92f8d4653d4ee9a155a50313d71ad130ca9bbdc54fb617ef90a224430b0a169f810e207e61e59856f4ef94cd55bcdee613fe027ddd3ae
|
|
7
|
+
data.tar.gz: 229002d79925c559f1693fc6f284c6d6629805644b51b2ff73e3fd05177f526bc4e75afde1793c96b85f0aba4ed9c272b9d1092013701420144311b43ee0ef3d
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arthur Freitas
|
|
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,187 @@
|
|
|
1
|
+
# Linus
|
|
2
|
+
|
|
3
|
+
A minimal Jekyll blog theme. Supports link posts, categories, tags, date archives, pagination, and dark mode out of the box.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your Jekyll site's `Gemfile`:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem "linus"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And add this line to your Jekyll site's `_config.yml`:
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
theme: linus
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Then execute:
|
|
20
|
+
|
|
21
|
+
$ bundle
|
|
22
|
+
|
|
23
|
+
Or install it yourself as:
|
|
24
|
+
|
|
25
|
+
$ gem install linus
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Layouts
|
|
30
|
+
|
|
31
|
+
| Layout | Purpose |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `default` | Base layout — full HTML document, loads CSS, renders header and footer |
|
|
34
|
+
| `blog` | Blog index listing with pagination; also used for date, tag, and category archives |
|
|
35
|
+
| `post` | Single post view |
|
|
36
|
+
| `page` | Simple content page |
|
|
37
|
+
|
|
38
|
+
### Writing posts
|
|
39
|
+
|
|
40
|
+
Create files in `_posts/` with this front matter:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
---
|
|
44
|
+
layout: post
|
|
45
|
+
title: "My Post Title"
|
|
46
|
+
date: 2026-01-01
|
|
47
|
+
category: Notes
|
|
48
|
+
author: arthur
|
|
49
|
+
tags:
|
|
50
|
+
- some tag
|
|
51
|
+
---
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Link posts** — set `title` to an empty string and provide a `source` URL. The post title renders as "↪ [fetched page title]" using `jekyll-url-metadata`:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
---
|
|
58
|
+
layout: post
|
|
59
|
+
title: ""
|
|
60
|
+
source: "https://example.com/article"
|
|
61
|
+
category: Links
|
|
62
|
+
---
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Authors
|
|
66
|
+
|
|
67
|
+
Define authors in `_data/authors.yml`:
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
arthur:
|
|
71
|
+
name: Arthur Freitas
|
|
72
|
+
uri: https://arthr.me/
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Reference them in post front matter with the `author` key.
|
|
76
|
+
|
|
77
|
+
### Category colors
|
|
78
|
+
|
|
79
|
+
Assign a background color to each category pill:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
category_colors:
|
|
83
|
+
- name: Links
|
|
84
|
+
color: "#f0e68c"
|
|
85
|
+
- name: Notes
|
|
86
|
+
color: "#fa8072"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Date formats
|
|
90
|
+
|
|
91
|
+
Customize how dates are displayed using strftime strings:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
date_formats:
|
|
95
|
+
day: "%b %d, '%y"
|
|
96
|
+
month: "%b, '%y"
|
|
97
|
+
year: "%Y"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Navigation menus
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
main_menu:
|
|
104
|
+
title: Navigate
|
|
105
|
+
items:
|
|
106
|
+
- url: "/about"
|
|
107
|
+
label: About
|
|
108
|
+
|
|
109
|
+
footer_menu:
|
|
110
|
+
title: Follow
|
|
111
|
+
items:
|
|
112
|
+
- label: RSS
|
|
113
|
+
url: /feed.xml
|
|
114
|
+
rel: alternate
|
|
115
|
+
- label: External Site
|
|
116
|
+
url: https://example.com
|
|
117
|
+
rel: me
|
|
118
|
+
external: true
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Set `external: true` on any item to open it in a new tab.
|
|
122
|
+
|
|
123
|
+
### Translations
|
|
124
|
+
|
|
125
|
+
Override UI strings for archive headings and pagination:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
translations:
|
|
129
|
+
archive_date_title: "Archives from %date"
|
|
130
|
+
archive_tag_title: "Posts tagged with %tag"
|
|
131
|
+
archive_category_title: "Posts filed under %category"
|
|
132
|
+
blog_pagination_title: "Blog pagination"
|
|
133
|
+
blog_pagination_prev_page: "Previous page"
|
|
134
|
+
blog_pagination_next_page: "Next page"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Pagination
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
paginate: 12
|
|
141
|
+
paginate_path: "/pg/:num/"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Customization
|
|
145
|
+
|
|
146
|
+
### Custom styles
|
|
147
|
+
|
|
148
|
+
Override or extend the theme's CSS by creating `assets/css/theme.css` in your site. This file is loaded last, after all theme styles. Use it to redefine CSS custom properties or add new rules:
|
|
149
|
+
|
|
150
|
+
```css
|
|
151
|
+
:root {
|
|
152
|
+
--font-body: Georgia, serif;
|
|
153
|
+
--color-accent: tomato;
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Custom fonts
|
|
158
|
+
|
|
159
|
+
Create `assets/css/fonts.css` in your site to load your own web fonts:
|
|
160
|
+
|
|
161
|
+
```css
|
|
162
|
+
@font-face {
|
|
163
|
+
font-family: 'My Font';
|
|
164
|
+
font-weight: 400;
|
|
165
|
+
src: url('/assets/fonts/myfont.woff2') format('woff2');
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Then reference it in `theme.css`:
|
|
170
|
+
|
|
171
|
+
```css
|
|
172
|
+
:root {
|
|
173
|
+
--font-body: 'My Font', sans-serif;
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Development
|
|
178
|
+
|
|
179
|
+
To set up your environment to develop this theme, run `bundle install`.
|
|
180
|
+
|
|
181
|
+
The repository is also a working Jekyll site for local development. To preview the theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. As you modify theme files, the site regenerates automatically.
|
|
182
|
+
|
|
183
|
+
Posts in `_posts/` and `index.html` exist only for local testing and are not included in the published gem.
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
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,81 @@
|
|
|
1
|
+
title: Linus
|
|
2
|
+
description: A blog theme for Jekyll.
|
|
3
|
+
|
|
4
|
+
lang: en
|
|
5
|
+
|
|
6
|
+
logo: /assets/icon.png
|
|
7
|
+
|
|
8
|
+
# Theme Settings / TODO: Doc
|
|
9
|
+
category_colors:
|
|
10
|
+
- name: Links
|
|
11
|
+
color: "#f0e68c"
|
|
12
|
+
- name: Notes
|
|
13
|
+
color: "#fa8072"
|
|
14
|
+
|
|
15
|
+
date_formats:
|
|
16
|
+
day: "%b %d, ’%y"
|
|
17
|
+
month: "%b, ’%y"
|
|
18
|
+
year: "%Y"
|
|
19
|
+
|
|
20
|
+
translations:
|
|
21
|
+
archive_date_title: "Archives from %date"
|
|
22
|
+
archive_tag_title: "Posts tagged with %tag"
|
|
23
|
+
archive_category_title: "Posts filed under %category"
|
|
24
|
+
blog_pagination_title: "Blog pagination"
|
|
25
|
+
blog_pagination_prev_page: "Previous page"
|
|
26
|
+
blog_pagination_next_page: "Next page"
|
|
27
|
+
|
|
28
|
+
main_menu:
|
|
29
|
+
title: Navigate
|
|
30
|
+
items:
|
|
31
|
+
- url: "/about"
|
|
32
|
+
label: About
|
|
33
|
+
- url: "/tags/updates"
|
|
34
|
+
label: Changelog
|
|
35
|
+
- url: "https://tangled.org/arthr.me/linus"
|
|
36
|
+
label: Code
|
|
37
|
+
|
|
38
|
+
footer_menu:
|
|
39
|
+
title: Follow
|
|
40
|
+
items:
|
|
41
|
+
- label: Tangled
|
|
42
|
+
url: https://tangled.org/arthr.me/linus
|
|
43
|
+
rel: me
|
|
44
|
+
external: true
|
|
45
|
+
- label: RSS
|
|
46
|
+
url: /feed.xml
|
|
47
|
+
rel: alternate
|
|
48
|
+
- label: JSON Feed
|
|
49
|
+
url: /feed.json
|
|
50
|
+
rel: alternate
|
|
51
|
+
|
|
52
|
+
# Build Settings
|
|
53
|
+
permalink: "/:year/:month/:day/:title:output_ext"
|
|
54
|
+
|
|
55
|
+
paginate: 12
|
|
56
|
+
paginate_path: "/pg/:num/"
|
|
57
|
+
|
|
58
|
+
plugins:
|
|
59
|
+
- jekyll-feed
|
|
60
|
+
- jekyll-json-feed
|
|
61
|
+
- jekyll-seo-tag
|
|
62
|
+
- jekyll-archives
|
|
63
|
+
- jekyll-url-metadata
|
|
64
|
+
- jekyll-sitemap
|
|
65
|
+
- jekyll-paginate
|
|
66
|
+
|
|
67
|
+
jekyll-archives:
|
|
68
|
+
enabled: all
|
|
69
|
+
layout: blog
|
|
70
|
+
permalinks:
|
|
71
|
+
category: "/:name/"
|
|
72
|
+
tag: "/tag/:name/"
|
|
73
|
+
year: "/:year/"
|
|
74
|
+
month: "/:year/:month/"
|
|
75
|
+
day: "/:year/:month/:day/"
|
|
76
|
+
|
|
77
|
+
seo:
|
|
78
|
+
name: Linus
|
|
79
|
+
links:
|
|
80
|
+
- https://tangled.org/arthr.me/linus
|
|
81
|
+
- https://bsky.app/profile/arthr.me
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{%- if site.categories -%}
|
|
2
|
+
<nav class="blog-categories">
|
|
3
|
+
{%- for category in site.categories %}
|
|
4
|
+
{% assign category_slug = category | first | slugify: site.slug_mode %}
|
|
5
|
+
{%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%}
|
|
6
|
+
<a class="blog-category category {{ category_slug | prepend: '_' -}}" href="{{- category_url -}}">
|
|
7
|
+
{{- category | first -}}
|
|
8
|
+
</a>
|
|
9
|
+
{% endfor -%}
|
|
10
|
+
</nav>
|
|
11
|
+
{%- endif -%}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<article class="post h-entry">
|
|
2
|
+
<header class="post-header">
|
|
3
|
+
<a class="post-permalink u-url" href="{{- include.post.url | absolute_url -}}" rel="bookmark">
|
|
4
|
+
<time class="post-date dt-published" datetime="{{ include.post.date | date_to_xmlschema }}">
|
|
5
|
+
{{- include.post.date | date: site.date_formats.day -}}
|
|
6
|
+
</time>
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
{%- if include.post.title and include.post.title != "" -%}
|
|
10
|
+
<h2 class="post-title p-name">
|
|
11
|
+
<a href="{{- include.post.url | relative_url -}}">
|
|
12
|
+
{{- include.post.title -}}
|
|
13
|
+
</a>
|
|
14
|
+
</h2>
|
|
15
|
+
{%- assign post_title = include.post.title -%}
|
|
16
|
+
{%- elsif include.post.source -%}
|
|
17
|
+
{%- assign link_metadata = include.post.source | metadata -%}
|
|
18
|
+
|
|
19
|
+
<h2 class="post-title p-name">
|
|
20
|
+
{%- if link_metadata.title -%}
|
|
21
|
+
<cite class="post-title u-in-reply-to h-cite">
|
|
22
|
+
<a class="post-source-title u-url" href="{{- include.post.source -}}">
|
|
23
|
+
{{- link_metadata['og:title'] | default: link_metadata.title | prepend: "↪ " -}}
|
|
24
|
+
</a>
|
|
25
|
+
</cite>
|
|
26
|
+
{%- else -%}
|
|
27
|
+
<cite class="post-source-title u-in-reply-to h-cite">
|
|
28
|
+
<a class="post-source u-url p-name" href="{{- include.post.source -}}">
|
|
29
|
+
{{- include.post.source | remove: "https://" | remove: "http://" | prepend: "↪ " -}}
|
|
30
|
+
</a>
|
|
31
|
+
</cite>
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
</h2>
|
|
34
|
+
{%- endif -%}
|
|
35
|
+
|
|
36
|
+
{%- if include.post.categories -%}
|
|
37
|
+
{% for category in include.post.categories %}
|
|
38
|
+
{%- assign category_slug = category | slugify: site.slug_mode -%}
|
|
39
|
+
{%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%}
|
|
40
|
+
|
|
41
|
+
<a
|
|
42
|
+
class="post-category category {{ category_slug | prepend: "_" }} p-category"
|
|
43
|
+
href="{{ category_url | relative_url }}"
|
|
44
|
+
rel="tag"
|
|
45
|
+
>
|
|
46
|
+
{{- category -}}
|
|
47
|
+
</a>
|
|
48
|
+
{% endfor %}
|
|
49
|
+
{%- endif -%}
|
|
50
|
+
</header>
|
|
51
|
+
|
|
52
|
+
{%- if include.is_archive -%}
|
|
53
|
+
{%- if include.post.title == "" -%}
|
|
54
|
+
<div class="post-content p-summary">
|
|
55
|
+
{{ include.post.excerpt }}
|
|
56
|
+
</div>
|
|
57
|
+
{%- endif -%}
|
|
58
|
+
{%- else -%}
|
|
59
|
+
<div class="post-content e-content">
|
|
60
|
+
{{ include.post.content }}
|
|
61
|
+
</div>
|
|
62
|
+
{%- endif -%}
|
|
63
|
+
|
|
64
|
+
{%- if include.post.author or site.author -%}
|
|
65
|
+
<footer class="post-footer" {%- if include.is_archive or site.author or site.data.authors.size == 1 -%}hidden{%- endif -%}>
|
|
66
|
+
{%- assign author = include.post.author -%}
|
|
67
|
+
|
|
68
|
+
{%- if site.author -%}
|
|
69
|
+
{% assign author = site.author %}
|
|
70
|
+
{%- elsif site.data.authors -%}
|
|
71
|
+
{%- assign author = site.data.authors[include.post.author] -%}
|
|
72
|
+
{%- endif -%}
|
|
73
|
+
|
|
74
|
+
{%- if author.uri -%}
|
|
75
|
+
<p class="post-author p-author h-card">
|
|
76
|
+
<a class="p-name u-url" href="{{- author.uri -}}">
|
|
77
|
+
{{ author.name }}
|
|
78
|
+
</a>
|
|
79
|
+
</p>
|
|
80
|
+
{%- else -%}
|
|
81
|
+
<p class="post-author p-author h-card">
|
|
82
|
+
<span class="p-name">
|
|
83
|
+
{{- author -}}
|
|
84
|
+
</span>
|
|
85
|
+
</p>
|
|
86
|
+
{%- endif -%}
|
|
87
|
+
</footer>
|
|
88
|
+
{%- endif -%}
|
|
89
|
+
</article>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<footer class="site-footer">
|
|
2
|
+
<p>
|
|
3
|
+
<strong>{{ site.title }}</strong> — {{ site.description }}
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+
{% if site.footer_menu %}
|
|
7
|
+
<nav class="footer-menu" aria-label="{{ site.footer_menu.title }}">
|
|
8
|
+
{% for item in site.footer_menu.items %}
|
|
9
|
+
<a
|
|
10
|
+
class="menu-item"
|
|
11
|
+
href="{{ item.url }}"
|
|
12
|
+
{%- if item.external %} target="_blank" {%- endif -%}
|
|
13
|
+
{%- if item.rel %} rel="{{ item.rel }}" {%- endif -%}
|
|
14
|
+
>
|
|
15
|
+
{{- item.label -}}
|
|
16
|
+
</a>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
</nav>
|
|
19
|
+
{% endif %}
|
|
20
|
+
</footer>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{%- assign is_personal_website = false -%}
|
|
2
|
+
|
|
3
|
+
{%- if site.author or site.data.authors == 1 -%}
|
|
4
|
+
{%- assign is_personal_website = true -%}
|
|
5
|
+
{%- endif -%}
|
|
6
|
+
|
|
7
|
+
{%- capture site_branding -%}
|
|
8
|
+
<a class="site-branding h-card u-url" href="{{ '/' | absolute_url }}">
|
|
9
|
+
{% if site.logo %}
|
|
10
|
+
<img
|
|
11
|
+
class="site-logo u-photo"
|
|
12
|
+
src="{{ site.logo }}"
|
|
13
|
+
alt=""
|
|
14
|
+
/>
|
|
15
|
+
{% endif %}
|
|
16
|
+
|
|
17
|
+
<span class="site-name p-name {%- unless is_personal_website %} p-org {%- endunless -%}">
|
|
18
|
+
{{ site.title }}
|
|
19
|
+
</span>
|
|
20
|
+
</a>
|
|
21
|
+
{%- endcapture -%}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<header class="site-header">
|
|
25
|
+
{% if page.title and page.title != "" %}
|
|
26
|
+
<span class="site-title">
|
|
27
|
+
{{ site_branding }}
|
|
28
|
+
</span>
|
|
29
|
+
{% else %}
|
|
30
|
+
<h1 class="site-title">
|
|
31
|
+
{{ site_branding }}
|
|
32
|
+
</h1>
|
|
33
|
+
{% endif %}
|
|
34
|
+
|
|
35
|
+
{% if site.main_menu %}
|
|
36
|
+
<nav class="site-menu" aria-label="{{ site.main_menu.title }}">
|
|
37
|
+
{% for item in site.main_menu.items %}
|
|
38
|
+
<a class="menu-item" href="{{ item.url }}" {% if item.external %}target="_blank"{% endif %}>
|
|
39
|
+
{{- item.label -}}
|
|
40
|
+
</a>
|
|
41
|
+
{% endfor %}
|
|
42
|
+
</nav>
|
|
43
|
+
{% endif %}
|
|
44
|
+
</header>
|
data/_layouts/blog.html
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
{%- capture archive_title -%}
|
|
6
|
+
{%- if page.type or page.date -%}
|
|
7
|
+
<h1 class="archive-title p-name">
|
|
8
|
+
{%- if page.date -%}
|
|
9
|
+
{%- assign archive_date = page.date | date: site.date_formats[page.type] -%}
|
|
10
|
+
|
|
11
|
+
{{- site.translations.archive_date_title | replace: "%date", archive_date -}}
|
|
12
|
+
{%- else -%}
|
|
13
|
+
{%- if page.type == "tag" -%}
|
|
14
|
+
{{- site.translations.archive_tag_title | replace: "%tag", page.title -}}
|
|
15
|
+
{%- else -%}
|
|
16
|
+
{{- site.translations.archive_category_title | replace: "%category", page.title -}}
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- endif -%}
|
|
19
|
+
</h1>
|
|
20
|
+
{%- endif -%}
|
|
21
|
+
{%- endcapture -%}
|
|
22
|
+
|
|
23
|
+
{%- assign blog_posts = site.posts -%}
|
|
24
|
+
|
|
25
|
+
{%- if paginator.posts -%}
|
|
26
|
+
{%- assign blog_posts = paginator.posts -%}
|
|
27
|
+
{%- elsif page.posts -%}
|
|
28
|
+
{%- assign blog_posts = page.posts -%}
|
|
29
|
+
{%- endif -%}
|
|
30
|
+
|
|
31
|
+
<div class="blog-list h-feed">
|
|
32
|
+
{%- include blog/categories.html -%}
|
|
33
|
+
|
|
34
|
+
{{- archive_title }}
|
|
35
|
+
|
|
36
|
+
{% for post in blog_posts -%}
|
|
37
|
+
{%- assign is_archive = false -%}
|
|
38
|
+
{%- if page.type or page.date -%}
|
|
39
|
+
{%- assign is_archive = true -%}
|
|
40
|
+
{%- endif -%}
|
|
41
|
+
|
|
42
|
+
{%- include blog/post.html post=post is_archive=is_archive -%}
|
|
43
|
+
{%- endfor -%}
|
|
44
|
+
|
|
45
|
+
{% if paginator.previous_page or paginator.next_page -%}
|
|
46
|
+
<nav class="blog-pagination" aria-label="{{- site.translations.blog_pagination_title -}}">
|
|
47
|
+
{% if paginator.previous_page -%}
|
|
48
|
+
<a class="as-button prev-page menu-item" href="{{ paginator.previous_page_path | relative_url }}" rel="prev">
|
|
49
|
+
{{- site.translations.blog_pagination_prev_page -}}
|
|
50
|
+
</a>
|
|
51
|
+
{%- endif %}
|
|
52
|
+
|
|
53
|
+
{% if paginator.next_page -%}
|
|
54
|
+
<a class="as-button next-page menu-item" href="{{ paginator.next_page_path | relative_url }}" rel="next">
|
|
55
|
+
{{- site.translations.blog_pagination_next_page -}}
|
|
56
|
+
</a>
|
|
57
|
+
{%- endif %}
|
|
58
|
+
</nav>
|
|
59
|
+
{%- endif %}
|
|
60
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="{{ page.lang | default: site.lang }}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
|
|
7
|
+
{% if page.title and page.title != "" -%}
|
|
8
|
+
<title>{{ page.title }} ({{- site.title -}})</title>
|
|
9
|
+
{%- else -%}
|
|
10
|
+
<title>{{ site.title }} {%- if site.tagline %} ~ {{ site.tagline }}{%- endif -%}</title>
|
|
11
|
+
{%- endif %}
|
|
12
|
+
{% seo title=false %}
|
|
13
|
+
|
|
14
|
+
{%- feed_meta -%}
|
|
15
|
+
{%- json_feed_meta -%}
|
|
16
|
+
|
|
17
|
+
{% for link in site.seo.links %}
|
|
18
|
+
<link rel="me" href="{{ link }}" />
|
|
19
|
+
{% endfor %}
|
|
20
|
+
|
|
21
|
+
{%- if site.category_colors -%}
|
|
22
|
+
<style id="category-colors">
|
|
23
|
+
{%- for category in site.category_colors %}
|
|
24
|
+
.{{- category.name | slugify: site.slug_mode | prepend: "_" }} {
|
|
25
|
+
background-color: {{ category.color -}};
|
|
26
|
+
}
|
|
27
|
+
{%- endfor -%}
|
|
28
|
+
</style>
|
|
29
|
+
{%- endif -%}
|
|
30
|
+
|
|
31
|
+
<link rel="stylesheet" href="{%- link assets/css/base.css -%}" />
|
|
32
|
+
<link rel="stylesheet" href="{%- link assets/css/layout.css -%}" />
|
|
33
|
+
<link rel="stylesheet" href="{%- link assets/css/syntax.css -%}" />
|
|
34
|
+
<link rel="stylesheet" href="{%- link assets/css/theme.css -%}" />
|
|
35
|
+
<link rel="stylesheet" href="{%- link assets/css/fonts.css -%}" />
|
|
36
|
+
</head>
|
|
37
|
+
<body>
|
|
38
|
+
<div class="site">
|
|
39
|
+
{% include header.html %}
|
|
40
|
+
|
|
41
|
+
<main class="site-content">
|
|
42
|
+
{{ content }}
|
|
43
|
+
</main>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
{% include footer.html %}
|
|
47
|
+
</div>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
data/_layouts/page.html
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<article class="post">
|
|
6
|
+
<header class="post-header">
|
|
7
|
+
{%- if page.title and page.title != "" -%}
|
|
8
|
+
<h1 class="post-titlee">
|
|
9
|
+
{{- page.title -}}
|
|
10
|
+
</h1>
|
|
11
|
+
{%- endif -%}
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<div class="post-content e-content">
|
|
15
|
+
{{ content }}
|
|
16
|
+
</div>
|
|
17
|
+
</article>
|
|
18
|
+
|
|
19
|
+
|
data/_layouts/post.html
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
{%- include blog/categories.html -%}
|
|
6
|
+
|
|
7
|
+
<article class="post h-entry">
|
|
8
|
+
<header class="post-header">
|
|
9
|
+
<a class="post-permalink u-url" href="{{- page.url | absolute_url -}}" rel="bookmark">
|
|
10
|
+
<time class="post-date dt-published" datetime="{{ page.date | date_to_xmlschema }}">
|
|
11
|
+
{{- page.date | date: site.date_formats.day -}}
|
|
12
|
+
</time>
|
|
13
|
+
</a>
|
|
14
|
+
|
|
15
|
+
{%- if page.title and page.title != "" -%}
|
|
16
|
+
<h1 class="post-title p-name">
|
|
17
|
+
{{- page.title -}}
|
|
18
|
+
</h1>
|
|
19
|
+
{%- assign post_title = page.title -%}
|
|
20
|
+
{%- elsif page.source -%}
|
|
21
|
+
{%- assign link_metadata = page.source | metadata -%}
|
|
22
|
+
|
|
23
|
+
<h2 class="post-title p-name">
|
|
24
|
+
{%- if link_metadata.title -%}
|
|
25
|
+
<cite class="post-title u-in-reply-to h-cite">
|
|
26
|
+
<a class="post-source-title u-url" href="{{- page.source -}}">
|
|
27
|
+
{{- link_metadata['og:title'] | default: link_metadata.title | prepend: "↪ " -}}
|
|
28
|
+
</a>
|
|
29
|
+
</cite>
|
|
30
|
+
{%- else -%}
|
|
31
|
+
<cite class="post-source-title u-in-reply-to h-cite">
|
|
32
|
+
<a class="post-source u-url p-name" href="{{- page.source -}}">
|
|
33
|
+
{{- page.source | remove: "https://" | remove: "http://" | prepend: "↪ " -}}
|
|
34
|
+
</a>
|
|
35
|
+
</cite>
|
|
36
|
+
{%- endif -%}
|
|
37
|
+
</h2>
|
|
38
|
+
{%- endif -%}
|
|
39
|
+
|
|
40
|
+
{%- if page.categories -%}
|
|
41
|
+
{% for category in page.categories %}
|
|
42
|
+
{%- assign category_slug = category | slugify: site.slug_mode -%}
|
|
43
|
+
{%- assign category_url = site.jekyll-archives.permalinks.category | replace: ":name", category_slug -%}
|
|
44
|
+
|
|
45
|
+
<a
|
|
46
|
+
class="post-category category {{ category_slug | prepend: "_" }} p-category"
|
|
47
|
+
href="{{ category_url | relative_url }}"
|
|
48
|
+
rel="tag"
|
|
49
|
+
>
|
|
50
|
+
{{- category -}}
|
|
51
|
+
</a>
|
|
52
|
+
{% endfor %}
|
|
53
|
+
{%- endif -%}
|
|
54
|
+
</header>
|
|
55
|
+
|
|
56
|
+
<div class="post-content e-content">
|
|
57
|
+
{{ page.content }}
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
{%- if page.author or site.author or page.tags -%}
|
|
61
|
+
<footer class="post-footer">
|
|
62
|
+
{%- assign author = page.author -%}
|
|
63
|
+
|
|
64
|
+
{%- if site.author -%}
|
|
65
|
+
{% assign author = site.author %}
|
|
66
|
+
{%- elsif site.data.authors -%}
|
|
67
|
+
{%- assign author = site.data.authors[page.author] -%}
|
|
68
|
+
{%- endif -%}
|
|
69
|
+
|
|
70
|
+
{%- if author.uri -%}
|
|
71
|
+
<p class="post-author p-author h-card">
|
|
72
|
+
<a class="p-name u-url" href="{{- author.uri -}}">
|
|
73
|
+
{{ author.name }}
|
|
74
|
+
</a>
|
|
75
|
+
</p>
|
|
76
|
+
{%- else -%}
|
|
77
|
+
<p class="post-author p-author h-card">
|
|
78
|
+
<span class="p-name">
|
|
79
|
+
{{- author -}}
|
|
80
|
+
</span>
|
|
81
|
+
</p>
|
|
82
|
+
{%- endif -%}
|
|
83
|
+
|
|
84
|
+
{%- if page.tags -%}
|
|
85
|
+
<ul class="post-tags">
|
|
86
|
+
{%- for tag in page.tags -%}
|
|
87
|
+
{%- assign tag_slug = tag | slugify: site.slug_mode -%}
|
|
88
|
+
{%- assign tag_url = site.jekyll-archives.permalinks.tag | replace: ":name", tag_slug -%}
|
|
89
|
+
|
|
90
|
+
<li class="tag-item">
|
|
91
|
+
<a class="p-category" href="{{ tag_url }}" rel="tag">
|
|
92
|
+
{{ tag }}
|
|
93
|
+
</a>
|
|
94
|
+
</li>
|
|
95
|
+
{%- endfor -%}
|
|
96
|
+
</ul>
|
|
97
|
+
{%- endif -%}
|
|
98
|
+
</footer>
|
|
99
|
+
{%- endif -%}
|
|
100
|
+
</article>
|
|
101
|
+
|