jekyll-theme-endless 0.0.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +187 -2
- data/_config.yml +8 -9
- data/_includes/content_footer-usernames.html +36 -0
- data/_includes/function_list-pages.html +26 -7
- data/_includes/function_list-posts.html +1 -1
- data/_includes/function_tag-cloud.html +60 -0
- data/_layouts/default.html +109 -2
- data/_layouts/html.html +15 -1
- data/_layouts/page-postlist.html +1 -1
- data/_layouts/page-tag.html +22 -0
- data/_layouts/page.html +6 -0
- data/_layouts/post.html +6 -0
- data/_plugins/generate-tagpages.rb +76 -0
- data/_sass/address.scss +15 -0
- data/_sass/background.scss +5 -1
- data/_sass/tag-cloud.scss +18 -0
- data/_sass/user.scss +1 -7
- data/assets/css/main.scss +3 -0
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a765efd0983e1ceede6edf8cb5e9585d1a7443ab9caa5bf1ed9d21d8a83d991
|
4
|
+
data.tar.gz: 7a0845b138a722faca39492e729990081a622cb694b7434ce6bb15ff1cbe2d98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 218292073372247f62a3a5233e7833a4f1c01daef7ae856547d1b3b163b3104288e851d636e8170eeedd7c1c0bb68fa7b7cca1ea4c0646efe324fe43e1fa574b
|
7
|
+
data.tar.gz: 4547082a60f0a47c89539ddad558b303efda39350942f2e604b428a54a39cdc455daa1780cd34709607444c57ab8ab8d40f55e32e0408d6926b78c0b2078d832
|
data/README.adoc
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
= jekyll-theme-endless
|
2
|
+
:page-menu_label: Documentation
|
3
|
+
:page-menu_position: 300
|
4
|
+
|
5
|
+
|
2
6
|
|
3
7
|
== Installation
|
4
8
|
|
@@ -24,6 +28,20 @@ Or install it yourself as:
|
|
24
28
|
|
25
29
|
$ gem install jekyll-theme-endless
|
26
30
|
|
31
|
+
|
32
|
+
|
33
|
+
== General information
|
34
|
+
|
35
|
+
The theme is styled using https://getbootstrap.com/[Bootstrap] that is added
|
36
|
+
via a content delivery network (CDN; here: https://www.jsdelivr.com/).
|
37
|
+
|
38
|
+
The output of page variables (e.g. `page.title` or `page.menu_label`) is *not escaped* by the theme-layout.
|
39
|
+
The reason is, that Jekyll-AsciiDoc (in contrast to Markdown) escapes HTML by default.
|
40
|
+
Thus, using (unescaped) HTML-commands e.g. in titles of Markdown posts/pages might break the layout.
|
41
|
+
If you want to use Markdown AND have HTML-commands in the title, simply escape them (e.g. use `<` instead of `<`).
|
42
|
+
|
43
|
+
|
44
|
+
|
27
45
|
== Usage
|
28
46
|
|
29
47
|
Here I describe available layouts, includes, sass and/or assets here.
|
@@ -36,15 +54,109 @@ HTML boilerplate code used for all layouts.
|
|
36
54
|
`_layouts/default.html`::
|
37
55
|
Default website structure (menue, tag cloud, ...) used for pages and posts.
|
38
56
|
|
57
|
+
Contains a *navigation bar* with a configurable brand-label.
|
58
|
+
Set `brand` in your `_config.yml`, to determine what is shown on the left side of the navigation.
|
59
|
+
Example:
|
60
|
+
|
61
|
+
[source, yaml]
|
62
|
+
----
|
63
|
+
brand: '"<i>endless</i>"-Theme'
|
64
|
+
----
|
65
|
+
|
66
|
+
Contains a configurable *title bar*.
|
67
|
+
Set `title` and `subtitle` in your `_config.yml`, to determine what is shown below the navigation bar.
|
68
|
+
If none of the two values is set, the title bar is omitted.
|
69
|
+
Example:
|
70
|
+
|
71
|
+
[source, yaml]
|
72
|
+
----
|
73
|
+
title: 'Brandname'
|
74
|
+
subtitle: 'Vision statement'
|
75
|
+
----
|
76
|
+
|
77
|
+
Contains a configurable *footer*.
|
78
|
+
Includes `content_footer-usernames.html` to generate a list of contact options.
|
79
|
+
Configure values in `_config.yml`.
|
80
|
+
Example:
|
81
|
+
|
82
|
+
[source, yaml]
|
83
|
+
----
|
84
|
+
author: Sven Boekhoff
|
85
|
+
copydate: 2020
|
86
|
+
disclaimer: >- # this means to ignore newlines until the next entry
|
87
|
+
I'm creating this Jekyll theme because I want to use it myself.
|
88
|
+
Therefore, many things (e.g. the support of AsciiDoc) are based on personal requirements.
|
89
|
+
You are welcome to use the theme (at your own risk) and contribute to the development.
|
90
|
+
----
|
91
|
+
|
92
|
+
|
39
93
|
`_layouts/page.html`::
|
40
94
|
Layout of page-content.
|
41
95
|
|
96
|
+
Start a new page in *AsciiDoc* by adding a file ending with `.adoc`.
|
97
|
+
Do not forget the `page-`-prefix when setting page variables.
|
98
|
+
Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
|
99
|
+
Thus, you typically do not have to set the layout to `page` or `post`.
|
100
|
+
[source, AsciiDoc]
|
101
|
+
----
|
102
|
+
= Page title
|
103
|
+
:page-layout: page
|
104
|
+
|
105
|
+
Content.
|
106
|
+
----
|
107
|
+
|
108
|
+
Start a new page in *Markdown* by adding a file ending with `.md`.
|
109
|
+
|
110
|
+
[source, Markdown]
|
111
|
+
----
|
112
|
+
---
|
113
|
+
layout: page
|
114
|
+
# Use either a `# Heading` OR set the title in the frontmatter.
|
115
|
+
# Using both will result in two headings.
|
116
|
+
---
|
117
|
+
# Page title
|
118
|
+
|
119
|
+
Content
|
120
|
+
----
|
121
|
+
|
42
122
|
`_layouts/page-postlist.html`::
|
43
123
|
Layout of page-content with a list of blog posts at the end.
|
44
124
|
|
125
|
+
`_layouts/page-tag.html`::
|
126
|
+
Layout of pages containing a list of those posts being tagged with a given tag.
|
127
|
+
This file is required by the `generate-tagpages`-plugin.
|
128
|
+
|
45
129
|
`_layouts/post.html`::
|
46
130
|
Layout of blog-posts.
|
47
131
|
|
132
|
+
Start a new post in *AsciiDoc* by adding a file ending with `.adoc` to the `_posts/`-folder.
|
133
|
+
Do not forget the `page-`-prefix when setting page variables.
|
134
|
+
Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
|
135
|
+
Thus, you typically do not have to set the layout to `page` or `post`.
|
136
|
+
[source, AsciiDoc]
|
137
|
+
----
|
138
|
+
= Page title
|
139
|
+
:page-layout: post
|
140
|
+
|
141
|
+
Content.
|
142
|
+
----
|
143
|
+
|
144
|
+
Start a new post in *Markdown* by adding a file ending with `.md`.
|
145
|
+
|
146
|
+
[source, Markdown]
|
147
|
+
----
|
148
|
+
---
|
149
|
+
layout: post
|
150
|
+
# If the title of the post should be different from parts of the filename,
|
151
|
+
# change it using the title variable.
|
152
|
+
# Using a `# Heading` will result in two headings in the post.
|
153
|
+
title: Page title
|
154
|
+
---
|
155
|
+
|
156
|
+
Content
|
157
|
+
----
|
158
|
+
|
159
|
+
|
48
160
|
|
49
161
|
=== Includes
|
50
162
|
|
@@ -52,10 +164,61 @@ Layout of blog-posts.
|
|
52
164
|
Generates the code containing links to each page.
|
53
165
|
The text of the link is the title of the page.
|
54
166
|
|
167
|
+
If the text should be different from the page-title, set the page variable `menu_label`.
|
168
|
+
In AsciiDoc files this could be e.g.: `:page-menu_label: 'AnotherText'`.
|
169
|
+
|
170
|
+
The order of the links can be determined with the help of the page variable `menu_label`
|
171
|
+
(in AsciiDoc e.g. `:page-menu_position: 100`; in frontmatter e.g. `menu_position: 50`).
|
172
|
+
Pages with higher numbers appear on the left side of the menu.
|
173
|
+
Pages with a negative value for `menu_label` will be hidden from the menu.
|
174
|
+
This can be useful for your 404 page, which should be generated by Jekyll, but not visible in the menu.
|
175
|
+
|
55
176
|
`_includes/function_list-posts.html`::
|
56
177
|
Generates the code containing links to each blog-post.
|
57
178
|
The text of the link is the title of the post.
|
58
179
|
|
180
|
+
`_includes/function_tag-cloud.html`::
|
181
|
+
Generates a tag cloud.
|
182
|
+
|
183
|
+
`_includes/content_footer-usernames.html`::
|
184
|
+
Creates a list of contact options based on provided usernames and addresses.
|
185
|
+
The entries are preceded with the icons of (e.g.) the social network and are linked to the corresponding profile.
|
186
|
+
|
187
|
+
In your `_config.yml` use for example:
|
188
|
+
|
189
|
+
[source, YAML]
|
190
|
+
----
|
191
|
+
email: your-email@example.com
|
192
|
+
username_gitlab: XXXX
|
193
|
+
username_github: XXXX
|
194
|
+
username_xing: XXXX
|
195
|
+
username_linkedin: XXXX
|
196
|
+
----
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
=== Plugins
|
201
|
+
|
202
|
+
`_plugins/generate-tagpages.rb`
|
203
|
+
|
204
|
+
Generates a page for each tag listed in `site.tags`.
|
205
|
+
The files created are by default named `tags/<tagname>/index.html`.
|
206
|
+
The content is generated using the layout file `_layouts/page-tag.html`
|
207
|
+
|
208
|
+
The following values can be set in `_config.yml`:
|
209
|
+
|
210
|
+
[source, YAML]
|
211
|
+
----
|
212
|
+
# Settings for tag cloud:
|
213
|
+
# The name of the directory in which the files for each tag are created
|
214
|
+
# default: `tags`
|
215
|
+
tag_dir: post-for-tag
|
216
|
+
# Prefix to be used for the title of the tag-page
|
217
|
+
# default: `Tag: `
|
218
|
+
tag_title_prefix: "Posts tagged with: "
|
219
|
+
----
|
220
|
+
|
221
|
+
|
59
222
|
|
60
223
|
=== Styles
|
61
224
|
|
@@ -64,12 +227,27 @@ This file is included by `assets/css/main.scss`.
|
|
64
227
|
|
65
228
|
|
66
229
|
|
230
|
+
== Settings
|
231
|
+
|
232
|
+
=== Language
|
233
|
+
|
234
|
+
The language of the content can be set using `page.lang` which overrides `site.lang`.
|
235
|
+
The default is `en`.
|
236
|
+
|
237
|
+
* use e.g. `:page-lang: en` in AsciiDoc
|
238
|
+
* use e.g. `lang: en` in frontmatter
|
239
|
+
* use e.g. `lang: en` in `_config.yml`
|
240
|
+
|
241
|
+
|
242
|
+
|
67
243
|
== Contributing
|
68
244
|
|
69
245
|
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io.
|
70
246
|
This project is intended to be a safe, welcoming space for collaboration,
|
71
247
|
and contributors are expected to adhere to the http://contributor-covenant.org[Contributor Covenant] code of conduct.
|
72
248
|
|
249
|
+
|
250
|
+
|
73
251
|
== Development
|
74
252
|
|
75
253
|
To set up your environment to develop this theme:
|
@@ -77,9 +255,14 @@ To set up your environment to develop this theme:
|
|
77
255
|
. clone this repository
|
78
256
|
. run `bundle install`
|
79
257
|
|
80
|
-
|
81
|
-
To test
|
258
|
+
The theme is setup just like a normal Jekyll site!
|
259
|
+
To test the theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
|
82
260
|
This starts a Jekyll server using your theme.
|
261
|
+
To test the theme *with example-data*, run `bundle exec jekyll serve --config _config.yml,_data.yml`.
|
262
|
+
Values for theme specific configurations are stored in `_data.yml` and not in the themes `_config.yml`.
|
263
|
+
Since the `_config.yml` is shipped with the gem,
|
264
|
+
the users of your theme would otherwise have to unset the values in their own `config.yml`.
|
265
|
+
|
83
266
|
Add pages, documents, data, etc. like normal to test your theme's contents.
|
84
267
|
As you make modifications to your theme and to your content, your site will regenerate and
|
85
268
|
you should see the changes in the browser after a refresh, just like normal.
|
@@ -87,6 +270,8 @@ you should see the changes in the browser after a refresh, just like normal.
|
|
87
270
|
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
88
271
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-endless.gemspec` accordingly.
|
89
272
|
|
273
|
+
|
274
|
+
|
90
275
|
== License
|
91
276
|
|
92
277
|
The theme is available as open source under the terms of the https://opensource.org/licenses/MIT[MIT License].
|
data/_config.yml
CHANGED
@@ -18,16 +18,15 @@
|
|
18
18
|
# You can create any custom variable you would like, and they will be accessible
|
19
19
|
# in the templates via {{ site.myvariable }}.
|
20
20
|
|
21
|
-
title: Your awesome title
|
22
|
-
email: your-email@example.com
|
23
|
-
description: >- # this means to ignore newlines until "baseurl:"
|
24
|
-
Write an awesome description for your new site here. You can edit this
|
25
|
-
line in _config.yml. It will appear in your document head meta (for
|
26
|
-
Google search results) and in your feed.xml site description.
|
27
21
|
baseurl: "" # the subpath of your site, e.g. /blog
|
28
22
|
url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
29
|
-
|
30
|
-
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
# Theme specific settings
|
27
|
+
# Find example data in _data.yml of the theme repository.
|
28
|
+
# Run `bundle exec jekyll serve --config _config.yml,_data.yml`
|
29
|
+
|
31
30
|
|
32
31
|
# Build settings
|
33
32
|
#theme: minima
|
@@ -45,7 +44,6 @@ url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
|
45
44
|
exclude:
|
46
45
|
- '*.gemspec'
|
47
46
|
- LICENSE.txt
|
48
|
-
- README.adoc
|
49
47
|
# - .sass-cache/
|
50
48
|
# - .jekyll-cache/
|
51
49
|
# - gemfiles/
|
@@ -57,3 +55,4 @@ exclude:
|
|
57
55
|
# - vendor/gems/
|
58
56
|
# - vendor/ruby/
|
59
57
|
|
58
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{% comment %}
|
2
|
+
List of contacts in adress-bar.
|
3
|
+
{% endcomment %}
|
4
|
+
|
5
|
+
<ul class="list-unstyled">
|
6
|
+
{% if site.username_gitlab %}
|
7
|
+
<li>
|
8
|
+
<i class="fa fa-gitlab"></i>
|
9
|
+
<a href="https://gitlab.com/{{ site.username_gitlab }}">{{ site.username_gitlab }}</a>
|
10
|
+
</li>
|
11
|
+
{% endif %}
|
12
|
+
{% if site.username_github %}
|
13
|
+
<li>
|
14
|
+
<i class="fa fa-github"></i>
|
15
|
+
<a href="https://github.com/{{ site.username_github }}">{{ site.username_github }}</a>
|
16
|
+
</li>
|
17
|
+
{% endif %}
|
18
|
+
{% if site.username_xing %}
|
19
|
+
<li>
|
20
|
+
<i class="fa fa-xing"></i>
|
21
|
+
<a href="https://www.xing.com/profile/{{ site.username_xing }}">{{ site.username_xing }}</a>
|
22
|
+
</li>
|
23
|
+
{% endif %}
|
24
|
+
{% if site.username_linkedin %}
|
25
|
+
<li>
|
26
|
+
<i class="fa fa-linkedin"></i>
|
27
|
+
<a href="https://de.linkedin.com/in/{{ site.username_linkedin }}">{{ site.username_linkedin }}</a>
|
28
|
+
</li>
|
29
|
+
{% endif %}
|
30
|
+
{% if site.email %}
|
31
|
+
<li>
|
32
|
+
<i class="fa fa-at"></i>
|
33
|
+
<a href="mailto:{{ site.email }}">{{ site.email }}</a>
|
34
|
+
</li>
|
35
|
+
{% endif %}
|
36
|
+
</ul>
|
@@ -2,12 +2,31 @@
|
|
2
2
|
List of pages that were processed to HTML.
|
3
3
|
Used for the pages menu.
|
4
4
|
{% endcomment %}
|
5
|
-
<ul>
|
6
|
-
{% for current_page in site.html_pages %}
|
7
|
-
<li>
|
8
|
-
<a href="{{ current_page.url }}">{{ current_page.title }}</a>
|
9
|
-
</li>
|
10
|
-
{% endfor %}
|
11
|
-
</ul>
|
12
5
|
|
6
|
+
{% comment %}
|
7
|
+
Descending order according to their position value.
|
8
|
+
(Pages with higher number are on top of the list)
|
9
|
+
{% endcomment %}
|
10
|
+
{% assign reverse_list = site.html_pages | sort: 'menu_position' | reverse %}
|
11
|
+
|
12
|
+
{% for current_page in reverse_list %}
|
13
|
+
|
14
|
+
{% comment %}
|
15
|
+
In order for a menu entry to be visible,
|
16
|
+
1) either a name for the menu entry or a page title must be available
|
17
|
+
2) the position parameter must be larger or equal to 0
|
18
|
+
(to hide entries, use a negative value)
|
19
|
+
Pages that have not set the position parameter, will be placed to the end.
|
20
|
+
{% endcomment %}
|
21
|
+
|
22
|
+
{% assign label = current_page.menu_label | default: current_page.title %}
|
23
|
+
{% assign position = current_page.menu_position | default: 0 %}
|
24
|
+
|
25
|
+
{% if label and position >= 0 %}
|
26
|
+
<li class="nav-item">
|
27
|
+
<a class="nav-link" href="{{ current_page.url }}">{{ label }}</a>
|
28
|
+
</li>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% endfor %}
|
13
32
|
|
@@ -5,7 +5,7 @@ List of blog-posts.
|
|
5
5
|
<ul>
|
6
6
|
{% for current_post in site.posts %}
|
7
7
|
<li>
|
8
|
-
<a href="{{ current_post.url }}">{{ current_post.title }}</a>
|
8
|
+
{{ current_post.date | date: "%Y-%m-%d" }}: <a href="{{ current_post.url }}">{{ current_post.title }}</a>
|
9
9
|
</li>
|
10
10
|
{% endfor %}
|
11
11
|
</ul>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
{% comment %}
|
2
|
+
|
3
|
+
{% endcomment %}
|
4
|
+
{% assign tags = site.tags | sort %}
|
5
|
+
|
6
|
+
{% comment %}
|
7
|
+
Requirements:
|
8
|
+
- The tag with the most posts should always be displayed at 250%
|
9
|
+
- The tag with the fewest posts (this can also be more than 1!) always with 100%.
|
10
|
+
- All gradations in between should be distributed linearly.
|
11
|
+
|
12
|
+
Determine minimum an maximum value.
|
13
|
+
Assumption: Non of the tags occurs more than one million times.
|
14
|
+
|
15
|
+
{% endcomment %}
|
16
|
+
{% assign min = 1000000 %}
|
17
|
+
{% assign max = 0 %}
|
18
|
+
|
19
|
+
{% for tag in tags %}
|
20
|
+
{% assign postsWithThisTag = tag | last | size %}
|
21
|
+
{% if postsWithThisTag > max %}
|
22
|
+
{% assign max = postsWithThisTag %}
|
23
|
+
{% endif %}
|
24
|
+
{% if postsWithThisTag < min %}
|
25
|
+
{% assign min = postsWithThisTag %}
|
26
|
+
{% endif %}
|
27
|
+
{% endfor %}
|
28
|
+
|
29
|
+
{% assign sizeDifference = 150 %}
|
30
|
+
{% assign steps = max | minus: min %}
|
31
|
+
|
32
|
+
<ul class="tag-cloud list-unstyled">
|
33
|
+
|
34
|
+
{% for tag in tags %}
|
35
|
+
<li>
|
36
|
+
{% comment %}
|
37
|
+
The size difference should be 150%.
|
38
|
+
The rarest tag should be displayed in 100%, the most frequent should be 250%.
|
39
|
+
100 + (aktZahl - min) * (250 / (max -min))
|
40
|
+
|
41
|
+
100: Minimum size
|
42
|
+
(aktZahl - min): Distance from the current value to the smallest value
|
43
|
+
(150 / (max -min)): Size difference in measures of the number of steps between the largest and the smallest value.
|
44
|
+
|
45
|
+
https://shopify.github.io/liquid/filters/divided_by/
|
46
|
+
To be on the safe side, create a float (times: 1.0)
|
47
|
+
{% endcomment %}
|
48
|
+
|
49
|
+
{% assign number = tag | last | size %}
|
50
|
+
{% assign percent = number | times: 1.0 | minus: min | times: sizeDifference | divided_by: steps | plus: 100 %}
|
51
|
+
{% assign tagname = tag | first | replace:'-', ' ' %}
|
52
|
+
|
53
|
+
<a
|
54
|
+
href = "/{{ site.tag_dir | default: 'tags' }}/{{ tag | first }}"
|
55
|
+
style = "font-size: {{ percent }}%"
|
56
|
+
title = "Number of posts with the tag '{{ tagname }}': {{ number }}"
|
57
|
+
>{{ tagname }}</a>
|
58
|
+
</li>
|
59
|
+
{% endfor %}
|
60
|
+
</ul>
|
data/_layouts/default.html
CHANGED
@@ -3,6 +3,113 @@
|
|
3
3
|
layout: html
|
4
4
|
---
|
5
5
|
|
6
|
-
|
6
|
+
<!-- Navigation -->
|
7
|
+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
8
|
+
<div class="container">
|
9
|
+
|
10
|
+
<!-- Brand Icon -->
|
11
|
+
{% if site.brand %}
|
12
|
+
<a class="navbar-brand" href="{{ "/" | relative_url}}">{{ site.brand }}</a>
|
13
|
+
{% endif %}
|
14
|
+
|
15
|
+
<!-- Burger menu -->
|
16
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
17
|
+
<span class="navbar-toggler-icon"></span>
|
18
|
+
</button>
|
19
|
+
|
20
|
+
<!-- Page links -->
|
21
|
+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
22
|
+
<ul class="navbar-nav mr-auto">
|
23
|
+
|
24
|
+
{% include function_list-pages.html %}
|
25
|
+
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</div>
|
30
|
+
</nav>
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
<!-- Page title -->
|
35
|
+
{% if site.title or site.subtitle %}
|
36
|
+
<div class="jumbotron border-bottom bg-light py-4">
|
37
|
+
<div class="container">
|
38
|
+
|
39
|
+
{% if site.title %}
|
40
|
+
<div class="h1">{{ site.title }}</div>
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
{% if site.subtitle %}
|
44
|
+
<div class="h2">{{ site.subtitle }}</div>
|
45
|
+
{% endif %}
|
46
|
+
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
{% endif %}
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
<!-- Page content -->
|
54
|
+
<main class="container pt-4 pb-5" style="flex-grow: 1;" aria-label="Content">
|
55
|
+
|
56
|
+
<div class="row">
|
57
|
+
|
58
|
+
<div class="col-lg-8">
|
59
|
+
{{ content }}
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="col-lg-4">
|
63
|
+
<aside>
|
64
|
+
<h3>Blog Navigation</h3>
|
65
|
+
|
66
|
+
<!-- Tag-cloud -->
|
67
|
+
{% include function_tag-cloud.html %}
|
68
|
+
|
69
|
+
</aside>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
|
74
|
+
</main>
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
<!-- Footer -->
|
79
|
+
<footer class="footer border-top bg-light">
|
80
|
+
<div class="container">
|
81
|
+
|
82
|
+
<div class="row">
|
83
|
+
|
84
|
+
<div class="col-lg-3 col-md-4 text-left py-3">
|
85
|
+
<address>
|
86
|
+
<div class="h4">Contact me:</div>
|
87
|
+
{% include content_footer-usernames.html %}
|
88
|
+
</address>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="col-lg-6 col-md-5 text-left py-3">
|
92
|
+
{% if site.disclaimer %}
|
93
|
+
<h4>Disclaimer:</h4>
|
94
|
+
{{ site.disclaimer }}
|
95
|
+
{% endif %}
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div class="col-md-3 text-left py-3">
|
99
|
+
<h4>Note:</h4>
|
100
|
+
{% if site.copydate and site.author %}
|
101
|
+
<p>
|
102
|
+
© {{ site.copydate }} by <em>{{ site.author }}</em>
|
103
|
+
</p>
|
104
|
+
{% endif %}
|
105
|
+
<p>
|
106
|
+
Powered by <a href="https://jekyll-theme-endless.gitlab.io/">jekyll-theme-endless</a>.
|
107
|
+
</p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</footer>
|
114
|
+
|
7
115
|
|
8
|
-
{{ content }}
|
data/_layouts/html.html
CHANGED
@@ -3,17 +3,31 @@
|
|
3
3
|
# Used for the default website layout (with menu, etc.), as well as the 404-Page.
|
4
4
|
---
|
5
5
|
<!DOCTYPE html>
|
6
|
-
<html lang="en" dir="ltr">
|
6
|
+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}" dir="ltr">
|
7
7
|
<head>
|
8
8
|
<meta charset="utf-8">
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
9
10
|
<title>
|
10
11
|
{{ page.title }}
|
11
12
|
</title>
|
13
|
+
|
14
|
+
<!-- Font-awesome CSS: https://www.bootstrapcdn.com/fontawesome/ -->
|
15
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
16
|
+
<!-- Bootstrap CSS -->
|
17
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha256-93wNFzm2GO3EoByj9rKZCwGjAJAwr0nujPaOgwUt8ZQ=" crossorigin="anonymous">
|
18
|
+
|
19
|
+
<!-- Theme CSS -->
|
12
20
|
<link rel="stylesheet" href="/assets/css/main.css">
|
21
|
+
|
13
22
|
</head>
|
14
23
|
<body>
|
15
24
|
|
16
25
|
{{ content }}
|
17
26
|
|
27
|
+
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-jXCJJT3KKcnNjZ3rfsabCj1EX4j2omR4xxm+H5CtywE=" crossorigin="anonymous"></script>
|
29
|
+
|
18
30
|
</body>
|
19
31
|
</html>
|
32
|
+
|
33
|
+
|
data/_layouts/page-postlist.html
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
menu_position: -10
|
4
|
+
---
|
5
|
+
{% comment %}
|
6
|
+
page.tag and page.title are set by the plugin `generate-taglist`.
|
7
|
+
{% endcomment %}
|
8
|
+
{% if page.title %}
|
9
|
+
<h1>{{ page.title }}</h1>
|
10
|
+
{% endif %}
|
11
|
+
|
12
|
+
<ul>
|
13
|
+
{% for post in site.tags[ page.tag ] %}
|
14
|
+
|
15
|
+
<li>
|
16
|
+
{{ post.date | date: "%Y-%m-%d" }}: <a href="{{ post.url }}">{{ post.title }}</a>
|
17
|
+
</li>
|
18
|
+
|
19
|
+
{% endfor %}
|
20
|
+
</ul>
|
21
|
+
|
22
|
+
|
data/_layouts/page.html
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
3
|
---
|
4
|
+
{% comment %}
|
5
|
+
In Markdown pages, page.title is not filled.
|
6
|
+
Either set `title` in the frontmater, or use a `# Heading` on the page.
|
7
|
+
{% endcomment %}
|
8
|
+
{% if page.title %}
|
4
9
|
<h1>{{ page.title }}</h1>
|
10
|
+
{% endif %}
|
5
11
|
|
6
12
|
{{ content }}
|
data/_layouts/post.html
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
3
|
---
|
4
|
+
{% comment %}
|
5
|
+
In Markdown posts, page.title defaults to parts of the filename.
|
6
|
+
Thus, do not use `# Heading` in Blog posts, otherwise two H1-heading will appear.
|
7
|
+
{% endcomment %}
|
8
|
+
{% if page.title %}
|
4
9
|
<h1>{{ page.title }}</h1>
|
10
|
+
{% endif %}
|
5
11
|
|
6
12
|
{{ content }}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# Generator
|
2
|
+
|
3
|
+
# Generates a page for each tag listed in `site.tags`.
|
4
|
+
# The files created are by default named `tags/<tagname>/index.html`.
|
5
|
+
# The content is generated using the layout file `_layouts/page-tag.html`
|
6
|
+
|
7
|
+
# The following values can be set in `_config.yml`
|
8
|
+
# `tag_dir`
|
9
|
+
# * the name of the directory in which the files for each tag are created;
|
10
|
+
# * default: `tags`
|
11
|
+
# `tag_title_prefix`
|
12
|
+
# * Prefix to be used for the title of the page
|
13
|
+
# * default: `Tag: `
|
14
|
+
|
15
|
+
# Necessary files:
|
16
|
+
# `_layouts/page-tag.html` - used to generate content of tag files.
|
17
|
+
|
18
|
+
# The following values are made available in the layout:
|
19
|
+
# * `page.tag` - contains the tag
|
20
|
+
# * `page.title` - contains the generated title, e.g. "Tag: <tagname>"
|
21
|
+
|
22
|
+
# NOTE: after changes to the plugin, `jekyll serve` must be started again.
|
23
|
+
|
24
|
+
# See also: https://jekyllrb.com/docs/plugins/
|
25
|
+
# See also: https://jekyllrb.com/docs/plugins/generators/
|
26
|
+
|
27
|
+
module Jekyll
|
28
|
+
|
29
|
+
# TagPageGenerator is a subclass of Generator
|
30
|
+
class TagPageGenerator < Generator
|
31
|
+
safe true
|
32
|
+
# A Generator needs to implement the generate method
|
33
|
+
def generate(site)
|
34
|
+
# If a layout with the name `page-tag` exists
|
35
|
+
if site.layouts.key? 'page-tag'
|
36
|
+
# The directory in which the files are to be created is configured in `site.tag_dir`.
|
37
|
+
# If not, the directory `tags/` is used.
|
38
|
+
dir = site.config['tag_dir'] || 'tags'
|
39
|
+
|
40
|
+
# For each tag in the tag-list:
|
41
|
+
site.tags.each_key do |tag|
|
42
|
+
# Create a page-object using TagPage and add it to the `site.pages` array
|
43
|
+
site.pages << TagPage.new(site, site.source, File.join(dir, tag), tag)
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# TagPage is a subclass of Page
|
51
|
+
# It is used in the `TagPageGenerator`
|
52
|
+
class TagPage < Page
|
53
|
+
def initialize(site, base, dir, tag)
|
54
|
+
# Define instance variables ('@') to make values available in the super-class `Page`.
|
55
|
+
# The variables are available in the layout as e.g. `page.name`.
|
56
|
+
@site = site
|
57
|
+
@base = base
|
58
|
+
@dir = dir
|
59
|
+
@name = 'index.html'
|
60
|
+
|
61
|
+
self.process(@name)
|
62
|
+
self.read_yaml(File.join(base, '_layouts'), 'page-tag.html')
|
63
|
+
|
64
|
+
# The prefix for the generated title is set via `tag_title_prefix` in `_config.yml` and defaults to `Tag: `
|
65
|
+
tag_title_prefix = site.config['tag_title_prefix'] || 'Tag: '
|
66
|
+
# Generates the title for the tag page and makes it available in the layout file as `page.title`
|
67
|
+
self.data['title'] = "#{tag_title_prefix}#{tag}"
|
68
|
+
# Makes `page.tag` available in the layout file
|
69
|
+
self.data['tag'] = tag
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
|
data/_sass/address.scss
ADDED
data/_sass/background.scss
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Tag cloud.
|
3
|
+
*/
|
4
|
+
.tag-cloud {
|
5
|
+
text-align: center;
|
6
|
+
|
7
|
+
li {
|
8
|
+
display: inline;
|
9
|
+
}
|
10
|
+
/* Every tag in the tag cloud should have a point as a separator. */
|
11
|
+
li::after {
|
12
|
+
content: "·";
|
13
|
+
}
|
14
|
+
/* The last entry in the tag cloud should not have a point. */
|
15
|
+
li:last-child::after {
|
16
|
+
content: "";
|
17
|
+
}
|
18
|
+
}
|
data/_sass/user.scss
CHANGED
data/assets/css/main.scss
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-endless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Sven Boekhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
version: '4.1'
|
27
27
|
description:
|
28
28
|
email:
|
29
|
-
-
|
29
|
+
- rubygems.org@boekhoff.net
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
@@ -34,17 +34,23 @@ files:
|
|
34
34
|
- LICENSE.txt
|
35
35
|
- README.adoc
|
36
36
|
- _config.yml
|
37
|
+
- _includes/content_footer-usernames.html
|
37
38
|
- _includes/function_list-pages.html
|
38
39
|
- _includes/function_list-posts.html
|
40
|
+
- _includes/function_tag-cloud.html
|
39
41
|
- _layouts/default.html
|
40
42
|
- _layouts/html.html
|
41
43
|
- _layouts/page-postlist.html
|
44
|
+
- _layouts/page-tag.html
|
42
45
|
- _layouts/page.html
|
43
46
|
- _layouts/post.html
|
47
|
+
- _plugins/generate-tagpages.rb
|
48
|
+
- _sass/address.scss
|
44
49
|
- _sass/background.scss
|
50
|
+
- _sass/tag-cloud.scss
|
45
51
|
- _sass/user.scss
|
46
52
|
- assets/css/main.scss
|
47
|
-
homepage: https://jekyll-theme-endless.gitlab.io
|
53
|
+
homepage: https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io
|
48
54
|
licenses:
|
49
55
|
- MIT
|
50
56
|
metadata: {}
|
@@ -66,5 +72,5 @@ requirements: []
|
|
66
72
|
rubygems_version: 3.1.2
|
67
73
|
signing_key:
|
68
74
|
specification_version: 4
|
69
|
-
summary: A Jekyll theme that was started from scratch.
|
75
|
+
summary: A Jekyll theme that was started from scratch. View it on https://jekyll-theme-endless.gitlab.io/.
|
70
76
|
test_files: []
|