linus 1.0.0 → 1.1
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 +4 -4
- data/README.md +73 -28
- data/_config.yml +5 -1
- data/_data/authors.yml +3 -0
- data/_includes/below-post.html +3 -0
- data/_includes/blog/post.html +9 -8
- data/_includes/end.html +3 -0
- data/_includes/head.html +3 -0
- data/_layouts/archive.html +28 -0
- data/_layouts/default.html +6 -2
- data/_layouts/post.html +11 -7
- data/assets/css/layout.css +2 -2
- metadata +8 -3
- /data/_includes/{footer.html → site/footer.html} +0 -0
- /data/_includes/{header.html → site/header.html} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d21bd83ff0aefc3c22487dae931923f6bd0086bc101da47c91693abaeb43fcf
|
|
4
|
+
data.tar.gz: 5011e04fc10847ff4c9863cad25323fd56931b0f629b4146e7b867d754ec9444
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a427484ba636c1be648574c0380cb1fa5ee4a07bb4713262497c84c411041ed3c2bb8f53da2010206f9eb07299ffd33723913887d6e89a372ba3a75b5aa85a75
|
|
7
|
+
data.tar.gz: b3660dd87b1116e9d6811e8b22c498855cd6a31e57df47ec4ce5270e79d31fd72dbba99bcd0f6aeb7e08b02933849ff5a6475d8887d6830de6a0df80d038a5c0
|
data/README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Using Linus
|
|
4
|
+
permalink: /about/
|
|
5
|
+
---
|
|
4
6
|
|
|
7
|
+
Linus is a minimal blog theme for Jekyll. Supports link posts, categories, tags, archives (using [jekyll-archives](https://github.com/jekyll/jekyll-arcihves)) and dark mode out of the box.
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
10
|
Add this line to your Jekyll site's `Gemfile`:
|
|
@@ -51,7 +54,7 @@ tags:
|
|
|
51
54
|
---
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
**Link posts
|
|
57
|
+
**Link posts**: you can have link posts by setting a `post.source` front-matter on your post. If the title is left empty (`""`), Jekyll will try to fetch the link metadata and render the link title as your post title.
|
|
55
58
|
|
|
56
59
|
```yaml
|
|
57
60
|
---
|
|
@@ -64,37 +67,43 @@ category: Links
|
|
|
64
67
|
|
|
65
68
|
### Authors
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
Authors follow the same approach as [jekyll-feed](https://github.com/jekyll-feed) and [jekyll-archives](https://github.com/jekyll/jekyll-archives). You can have an author object set in a post, or in the site `_config.yml`, or in a `authors.yml` data file.
|
|
71
|
+
|
|
72
|
+
In a post:
|
|
68
73
|
|
|
69
74
|
```yaml
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
---
|
|
76
|
+
layout: post
|
|
77
|
+
title: My awesome first post
|
|
78
|
+
author:
|
|
79
|
+
name: Author Name
|
|
80
|
+
uri: https://example.com
|
|
81
|
+
picture: /path/to/author-picture.jpg
|
|
82
|
+
---
|
|
73
83
|
```
|
|
74
84
|
|
|
75
|
-
|
|
85
|
+
In your `_config.yml`:
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
```yaml
|
|
88
|
+
author:
|
|
89
|
+
name: Author Name
|
|
90
|
+
uri: https://example.com
|
|
91
|
+
picture: /path/to/author-picture.jpg
|
|
92
|
+
```
|
|
78
93
|
|
|
79
|
-
|
|
94
|
+
You can also define authors in `_data/authors.yml`:
|
|
80
95
|
|
|
81
96
|
```yaml
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
color: "#fa8072"
|
|
97
|
+
author_name:
|
|
98
|
+
name: Author Name
|
|
99
|
+
uri: https://example.com
|
|
100
|
+
picture: /path/to/author-picture.jpg
|
|
87
101
|
```
|
|
88
102
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Customize how dates are displayed using strftime strings:
|
|
103
|
+
Reference them in post front matter with the `author` key:
|
|
92
104
|
|
|
93
105
|
```yaml
|
|
94
|
-
|
|
95
|
-
day: "%b %d, '%y"
|
|
96
|
-
month: "%b, '%y"
|
|
97
|
-
year: "%Y"
|
|
106
|
+
author: author_name
|
|
98
107
|
```
|
|
99
108
|
|
|
100
109
|
### Navigation menus
|
|
@@ -126,6 +135,7 @@ Override UI strings for archive headings and pagination:
|
|
|
126
135
|
|
|
127
136
|
```yaml
|
|
128
137
|
translations:
|
|
138
|
+
byline: "By"
|
|
129
139
|
archive_date_title: "Archives from %date"
|
|
130
140
|
archive_tag_title: "Posts tagged with %tag"
|
|
131
141
|
archive_category_title: "Posts filed under %category"
|
|
@@ -134,15 +144,30 @@ translations:
|
|
|
134
144
|
blog_pagination_next_page: "Next page"
|
|
135
145
|
```
|
|
136
146
|
|
|
137
|
-
###
|
|
147
|
+
### Further options
|
|
138
148
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
149
|
+
Linus uses the following Jekyll plugins, which you can set up as you please. Refer to the plugins docs to learn how to change the way your site will handle pagination, archiving, feeds and SEO tags:
|
|
150
|
+
|
|
151
|
+
- [jekyll-pagination](https://github.com/jekyll/jekyll-pagination)
|
|
152
|
+
- [jekyll-archives](https://github.com/jekyll/jekyll-archives)
|
|
153
|
+
- [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag)
|
|
154
|
+
- [jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap)
|
|
155
|
+
- [jekyll-feed](https://github.com/jekyll/jekyll-feed)
|
|
156
|
+
- [jekyll-json-feed](https://github.com/lildude/jekyll-json-feed)
|
|
143
157
|
|
|
144
158
|
## Customization
|
|
145
159
|
|
|
160
|
+
### Date formats
|
|
161
|
+
|
|
162
|
+
Customize how dates are displayed using strftime strings:
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
date_formats:
|
|
166
|
+
day: "%b %d, '%y"
|
|
167
|
+
month: "%b, '%y"
|
|
168
|
+
year: "%Y"
|
|
169
|
+
```
|
|
170
|
+
|
|
146
171
|
### Custom styles
|
|
147
172
|
|
|
148
173
|
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:
|
|
@@ -154,6 +179,18 @@ Override or extend the theme's CSS by creating `assets/css/theme.css` in your si
|
|
|
154
179
|
}
|
|
155
180
|
```
|
|
156
181
|
|
|
182
|
+
#### Category colors
|
|
183
|
+
|
|
184
|
+
Assign a background color to each category pill:
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
category_colors:
|
|
188
|
+
- name: Links
|
|
189
|
+
color: "#f0e68c"
|
|
190
|
+
- name: Notes
|
|
191
|
+
color: "#fa8072"
|
|
192
|
+
```
|
|
193
|
+
|
|
157
194
|
### Custom fonts
|
|
158
195
|
|
|
159
196
|
Create `assets/css/fonts.css` in your site to load your own web fonts:
|
|
@@ -174,6 +211,14 @@ Then reference it in `theme.css`:
|
|
|
174
211
|
}
|
|
175
212
|
```
|
|
176
213
|
|
|
214
|
+
## Custom includes
|
|
215
|
+
|
|
216
|
+
Linus offers three custom includes to add markup to different parts of your website:
|
|
217
|
+
|
|
218
|
+
- `head.html`: right before the closing `</head>` tag.
|
|
219
|
+
- `below-post.html`: after the post footer in post pages.
|
|
220
|
+
- `end.html`: right before the closing `</body>` tag.
|
|
221
|
+
|
|
177
222
|
## Development
|
|
178
223
|
|
|
179
224
|
To set up your environment to develop this theme, run `bundle install`.
|
data/_config.yml
CHANGED
|
@@ -18,6 +18,7 @@ date_formats:
|
|
|
18
18
|
year: "%Y"
|
|
19
19
|
|
|
20
20
|
translations:
|
|
21
|
+
byline: "By"
|
|
21
22
|
archive_date_title: "Archives from %date"
|
|
22
23
|
archive_tag_title: "Posts tagged with %tag"
|
|
23
24
|
archive_category_title: "Posts filed under %category"
|
|
@@ -30,10 +31,13 @@ main_menu:
|
|
|
30
31
|
items:
|
|
31
32
|
- url: "/about"
|
|
32
33
|
label: About
|
|
33
|
-
- url: "/
|
|
34
|
+
- url: "/changelog"
|
|
34
35
|
label: Changelog
|
|
36
|
+
- url: "/archive"
|
|
37
|
+
label: Archive
|
|
35
38
|
- url: "https://tangled.org/arthr.me/linus"
|
|
36
39
|
label: Code
|
|
40
|
+
external: true
|
|
37
41
|
|
|
38
42
|
footer_menu:
|
|
39
43
|
title: Follow
|
data/_data/authors.yml
ADDED
data/_includes/blog/post.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</header>
|
|
51
51
|
|
|
52
52
|
{%- if include.is_archive -%}
|
|
53
|
-
{%- if include.post.title == "" -%}
|
|
53
|
+
{%- if include.post.title == "" and include.post.source == nil -%}
|
|
54
54
|
<div class="post-content p-summary">
|
|
55
55
|
{{ include.post.excerpt }}
|
|
56
56
|
</div>
|
|
@@ -71,19 +71,20 @@
|
|
|
71
71
|
{%- assign author = site.data.authors[include.post.author] -%}
|
|
72
72
|
{%- endif -%}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
<
|
|
74
|
+
<p class="post-author p-author h-card">
|
|
75
|
+
<span class="post-byline">
|
|
76
|
+
{{ site.translations.byline }}
|
|
77
|
+
</span>
|
|
78
|
+
{% if author.uri -%}
|
|
76
79
|
<a class="p-name u-url" href="{{- author.uri -}}">
|
|
77
80
|
{{ author.name }}
|
|
78
81
|
</a>
|
|
79
|
-
|
|
80
|
-
{%- else -%}
|
|
81
|
-
<p class="post-author p-author h-card">
|
|
82
|
+
{%- else -%}
|
|
82
83
|
<span class="p-name">
|
|
83
84
|
{{- author -}}
|
|
84
85
|
</span>
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
{%- endif -%}
|
|
87
|
+
</p>
|
|
87
88
|
</footer>
|
|
88
89
|
{%- endif -%}
|
|
89
90
|
</article>
|
data/_includes/end.html
ADDED
data/_includes/head.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
|
|
20
|
+
<div class="blog-list h-feed">
|
|
21
|
+
{%- include blog/categories.html -%}
|
|
22
|
+
|
|
23
|
+
{% for post in site.posts -%}
|
|
24
|
+
{%- assign is_archive = true -%}
|
|
25
|
+
|
|
26
|
+
{%- include blog/post.html post=post is_archive=is_archive -%}
|
|
27
|
+
{%- endfor -%}
|
|
28
|
+
</div>
|
data/_layouts/default.html
CHANGED
|
@@ -33,17 +33,21 @@
|
|
|
33
33
|
<link rel="stylesheet" href="{%- link assets/css/syntax.css -%}" />
|
|
34
34
|
<link rel="stylesheet" href="{%- link assets/css/theme.css -%}" />
|
|
35
35
|
<link rel="stylesheet" href="{%- link assets/css/fonts.css -%}" />
|
|
36
|
+
|
|
37
|
+
{%- include head.html -%}
|
|
36
38
|
</head>
|
|
37
39
|
<body>
|
|
38
40
|
<div class="site">
|
|
39
|
-
{% include header.html %}
|
|
41
|
+
{% include site/header.html %}
|
|
40
42
|
|
|
41
43
|
<main class="site-content">
|
|
42
44
|
{{ content }}
|
|
43
45
|
</main>
|
|
44
46
|
|
|
45
47
|
|
|
46
|
-
{% include footer.html %}
|
|
48
|
+
{% include site/footer.html %}
|
|
47
49
|
</div>
|
|
50
|
+
|
|
51
|
+
{%- include end.html -%}
|
|
48
52
|
</body>
|
|
49
53
|
</html>
|
data/_layouts/post.html
CHANGED
|
@@ -67,19 +67,21 @@ layout: default
|
|
|
67
67
|
{%- assign author = site.data.authors[page.author] -%}
|
|
68
68
|
{%- endif -%}
|
|
69
69
|
|
|
70
|
-
{
|
|
71
|
-
<
|
|
70
|
+
<p class="post-author p-author h-card" {% if site.author or site.data.authors.size == 1 -%}hidden{%- endif %}>
|
|
71
|
+
<span class="post-byline">
|
|
72
|
+
{{ site.translations.byline }}
|
|
73
|
+
</span>
|
|
74
|
+
|
|
75
|
+
{%- if author.uri -%}
|
|
72
76
|
<a class="p-name u-url" href="{{- author.uri -}}">
|
|
73
77
|
{{ author.name }}
|
|
74
78
|
</a>
|
|
75
|
-
|
|
76
|
-
{%- else -%}
|
|
77
|
-
<p class="post-author p-author h-card">
|
|
79
|
+
{%- else -%}
|
|
78
80
|
<span class="p-name">
|
|
79
81
|
{{- author -}}
|
|
80
82
|
</span>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
{%- endif -%}
|
|
84
|
+
</p>
|
|
83
85
|
|
|
84
86
|
{%- if page.tags -%}
|
|
85
87
|
<ul class="post-tags">
|
|
@@ -97,5 +99,7 @@ layout: default
|
|
|
97
99
|
{%- endif -%}
|
|
98
100
|
</footer>
|
|
99
101
|
{%- endif -%}
|
|
102
|
+
|
|
103
|
+
{%- include below-post.html -%}
|
|
100
104
|
</article>
|
|
101
105
|
|
data/assets/css/layout.css
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
--color-link: #2D5438;
|
|
25
25
|
--color-link-hover: #1E3826;
|
|
26
26
|
--color-support: #D9634E;
|
|
27
|
-
--color-shadows: color-mix(in srgb, var(--color-text), transparent
|
|
28
|
-
--color-shadows-hover: color-mix(in srgb, var(--color-text), transparent
|
|
27
|
+
--color-shadows: color-mix(in srgb, var(--color-text), transparent 85%);
|
|
28
|
+
--color-shadows-hover: color-mix(in srgb, var(--color-text), transparent 75%);
|
|
29
29
|
--color-border: color-mix(in srgb, currentcolor, transparent 50%);
|
|
30
30
|
}
|
|
31
31
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: linus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: '1.1'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arthur Freitas
|
|
@@ -130,10 +130,15 @@ files:
|
|
|
130
130
|
- LICENSE.txt
|
|
131
131
|
- README.md
|
|
132
132
|
- _config.yml
|
|
133
|
+
- _data/authors.yml
|
|
134
|
+
- _includes/below-post.html
|
|
133
135
|
- _includes/blog/categories.html
|
|
134
136
|
- _includes/blog/post.html
|
|
135
|
-
- _includes/
|
|
136
|
-
- _includes/
|
|
137
|
+
- _includes/end.html
|
|
138
|
+
- _includes/head.html
|
|
139
|
+
- _includes/site/footer.html
|
|
140
|
+
- _includes/site/header.html
|
|
141
|
+
- _layouts/archive.html
|
|
137
142
|
- _layouts/blog.html
|
|
138
143
|
- _layouts/default.html
|
|
139
144
|
- _layouts/page.html
|
|
File without changes
|
|
File without changes
|