jekyll-theme-endless 0.0.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 895ee6675bf014e980f0cedef57fdc044087039a7448798aa74734539b99421d
4
- data.tar.gz: c448fa60ced14cd1cc70b30d8152abc05aa3c970e9d38901bb6b86b1b8034549
3
+ metadata.gz: '048954cb6b01292c57d7aeddb592a94e02e71ca49ea3ff6bc17cc128e0a5dac5'
4
+ data.tar.gz: cc6597fcda7de04fd940b0904d0d542b18e9119201ccb0ddc1140080486ab456
5
5
  SHA512:
6
- metadata.gz: 73eb66c8bf2493deff4f3003ec9c6b336e98431d141d28300ad7fce87d41607e6fa090cd43e553147d4cf5266ed2320b55927f4e1424d0026004938841794e0a
7
- data.tar.gz: cc5f8ebc667554dde143e957c3d294700ca7655ddb2203ed1e9bd7402e5913ffcb7f3aa11706ca4724d0d3af060bb267275a3beae8eec1f844e206e09e5f2fdf
6
+ metadata.gz: 03d0427df894a7fa5d29e4d7a2021db478c702befa0ef8e43a0786cf3f7985a522310ff518df391282b8101e57cce2d993fbdfe4b7d82d4f961746adf3aa4e68
7
+ data.tar.gz: 77afae077fa3b9d8eaee554e650c5333a682ea6aba3ee003a28992d94dfb70dcc50631f1dd7425db003b04f67d41cd34948ca2ae56c83fec92df5632b34e3c7c
@@ -1,4 +1,13 @@
1
1
  = jekyll-theme-endless
2
+ :page-menu_label: Documentation
3
+ :page-menu_position: 300
4
+
5
+
6
+ == Quicktstart for testing
7
+
8
+ * Clone the repository
9
+ * Run `bundle exec jekyll serve --config _config.yml,_data.yml`
10
+ * Open http://127.0.0.1:4000/ to view a page using this theme
2
11
 
3
12
  == Installation
4
13
 
@@ -24,6 +33,20 @@ Or install it yourself as:
24
33
 
25
34
  $ gem install jekyll-theme-endless
26
35
 
36
+
37
+
38
+ == General information
39
+
40
+ The theme is styled using https://getbootstrap.com/[Bootstrap] that is added
41
+ via a content delivery network (CDN; here: https://www.jsdelivr.com/).
42
+
43
+ The output of page variables (e.g. `page.title` or `page.menu_label`) is *not escaped* by the theme-layout.
44
+ The reason is, that Jekyll-AsciiDoc (in contrast to Markdown) escapes HTML by default.
45
+ Thus, using (unescaped) HTML-commands e.g. in titles of Markdown posts/pages might break the layout.
46
+ If you want to use Markdown AND have HTML-commands in the title, simply escape them (e.g. use `&lt;` instead of `<`).
47
+
48
+
49
+
27
50
  == Usage
28
51
 
29
52
  Here I describe available layouts, includes, sass and/or assets here.
@@ -36,15 +59,109 @@ HTML boilerplate code used for all layouts.
36
59
  `_layouts/default.html`::
37
60
  Default website structure (menue, tag cloud, ...) used for pages and posts.
38
61
 
62
+ Contains a *navigation bar* with a configurable brand-label.
63
+ Set `brand` in your `_config.yml`, to determine what is shown on the left side of the navigation.
64
+ Example:
65
+
66
+ [source, yaml]
67
+ ----
68
+ brand: '"<i>endless</i>"-Theme'
69
+ ----
70
+
71
+ Contains a configurable *title bar*.
72
+ Set `title` and `subtitle` in your `_config.yml`, to determine what is shown below the navigation bar.
73
+ If none of the two values is set, the title bar is omitted.
74
+ Example:
75
+
76
+ [source, yaml]
77
+ ----
78
+ title: 'Brandname'
79
+ subtitle: 'Vision statement'
80
+ ----
81
+
82
+ Contains a configurable *footer*.
83
+ Includes `content_footer-usernames.html` to generate a list of contact options.
84
+ Configure values in `_config.yml`.
85
+ Example:
86
+
87
+ [source, yaml]
88
+ ----
89
+ author: Sven Boekhoff
90
+ copydate: 2020
91
+ disclaimer: >- # this means to ignore newlines until the next entry
92
+ I'm creating this Jekyll theme because I want to use it myself.
93
+ Therefore, many things (e.g. the support of AsciiDoc) are based on personal requirements.
94
+ You are welcome to use the theme (at your own risk) and contribute to the development.
95
+ ----
96
+
97
+
39
98
  `_layouts/page.html`::
40
99
  Layout of page-content.
41
100
 
101
+ Start a new page in *AsciiDoc* by adding a file ending with `.adoc`.
102
+ Do not forget the `page-`-prefix when setting page variables.
103
+ Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
104
+ Thus, you typically do not have to set the layout to `page` or `post`.
105
+ [source, AsciiDoc]
106
+ ----
107
+ = Page title
108
+ :page-layout: page
109
+
110
+ Content.
111
+ ----
112
+
113
+ Start a new page in *Markdown* by adding a file ending with `.md`.
114
+
115
+ [source, Markdown]
116
+ ----
117
+ ---
118
+ layout: page
119
+ # Use either a `# Heading` OR set the title in the frontmatter.
120
+ # Using both will result in two headings.
121
+ ---
122
+ # Page title
123
+
124
+ Content
125
+ ----
126
+
42
127
  `_layouts/page-postlist.html`::
43
128
  Layout of page-content with a list of blog posts at the end.
44
129
 
130
+ `_layouts/page-tag.html`::
131
+ Layout of pages containing a list of those posts being tagged with a given tag.
132
+ This file is required by the `generate-tagpages`-plugin.
133
+
45
134
  `_layouts/post.html`::
46
135
  Layout of blog-posts.
47
136
 
137
+ Start a new post in *AsciiDoc* by adding a file ending with `.adoc` to the `_posts/`-folder.
138
+ Do not forget the `page-`-prefix when setting page variables.
139
+ Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
140
+ Thus, you typically do not have to set the layout to `page` or `post`.
141
+ [source, AsciiDoc]
142
+ ----
143
+ = Page title
144
+ :page-layout: post
145
+
146
+ Content.
147
+ ----
148
+
149
+ Start a new post in *Markdown* by adding a file ending with `.md`.
150
+
151
+ [source, Markdown]
152
+ ----
153
+ ---
154
+ layout: post
155
+ # If the title of the post should be different from parts of the filename,
156
+ # change it using the title variable.
157
+ # Using a `# Heading` will result in two headings in the post.
158
+ title: Page title
159
+ ---
160
+
161
+ Content
162
+ ----
163
+
164
+
48
165
 
49
166
  === Includes
50
167
 
@@ -52,10 +169,61 @@ Layout of blog-posts.
52
169
  Generates the code containing links to each page.
53
170
  The text of the link is the title of the page.
54
171
 
172
+ If the text should be different from the page-title, set the page variable `menu_label`.
173
+ In AsciiDoc files this could be e.g.: `:page-menu_label: 'AnotherText'`.
174
+
175
+ The order of the links can be determined with the help of the page variable `menu_label`
176
+ (in AsciiDoc e.g. `:page-menu_position: 100`; in frontmatter e.g. `menu_position: 50`).
177
+ Pages with higher numbers appear on the left side of the menu.
178
+ Pages with a negative value for `menu_label` will be hidden from the menu.
179
+ This can be useful for your 404 page, which should be generated by Jekyll, but not visible in the menu.
180
+
55
181
  `_includes/function_list-posts.html`::
56
182
  Generates the code containing links to each blog-post.
57
183
  The text of the link is the title of the post.
58
184
 
185
+ `_includes/function_tag-cloud.html`::
186
+ Generates a tag cloud.
187
+
188
+ `_includes/content_footer-usernames.html`::
189
+ Creates a list of contact options based on provided usernames and addresses.
190
+ The entries are preceded with the icons of (e.g.) the social network and are linked to the corresponding profile.
191
+
192
+ In your `_config.yml` use for example:
193
+
194
+ [source, YAML]
195
+ ----
196
+ email: your-email@example.com
197
+ username_gitlab: XXXX
198
+ username_github: XXXX
199
+ username_xing: XXXX
200
+ username_linkedin: XXXX
201
+ ----
202
+
203
+
204
+
205
+ === Plugins
206
+
207
+ `_plugins/generate-tagpages.rb`
208
+
209
+ Generates a page for each tag listed in `site.tags`.
210
+ The files created are by default named `tags/<tagname>/index.html`.
211
+ The content is generated using the layout file `_layouts/page-tag.html`
212
+
213
+ The following values can be set in `_config.yml`:
214
+
215
+ [source, YAML]
216
+ ----
217
+ # Settings for tag cloud:
218
+ # The name of the directory in which the files for each tag are created
219
+ # default: `tags`
220
+ tag_dir: post-for-tag
221
+ # Prefix to be used for the title of the tag-page
222
+ # default: `Tag: `
223
+ tag_title_prefix: "Posts tagged with: "
224
+ ----
225
+
226
+
59
227
 
60
228
  === Styles
61
229
 
@@ -64,12 +232,27 @@ This file is included by `assets/css/main.scss`.
64
232
 
65
233
 
66
234
 
235
+ == Settings
236
+
237
+ === Language
238
+
239
+ The language of the content can be set using `page.lang` which overrides `site.lang`.
240
+ The default is `en`.
241
+
242
+ * use e.g. `:page-lang: en` in AsciiDoc
243
+ * use e.g. `lang: en` in frontmatter
244
+ * use e.g. `lang: en` in `_config.yml`
245
+
246
+
247
+
67
248
  == Contributing
68
249
 
69
250
  Bug reports and pull requests are welcome on GitHub at https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io.
70
251
  This project is intended to be a safe, welcoming space for collaboration,
71
252
  and contributors are expected to adhere to the http://contributor-covenant.org[Contributor Covenant] code of conduct.
72
253
 
254
+
255
+
73
256
  == Development
74
257
 
75
258
  To set up your environment to develop this theme:
@@ -77,9 +260,14 @@ To set up your environment to develop this theme:
77
260
  . clone this repository
78
261
  . run `bundle install`
79
262
 
80
- Your theme is setup just like a normal Jekyll site!
81
- To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
263
+ The theme is setup just like a normal Jekyll site!
264
+ To test the theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`.
82
265
  This starts a Jekyll server using your theme.
266
+ To test the theme *with example-data*, run `bundle exec jekyll serve --config _config.yml,_data.yml`.
267
+ Values for theme specific configurations are stored in `_data.yml` and not in the themes `_config.yml`.
268
+ Since the `_config.yml` is shipped with the gem,
269
+ the users of your theme would otherwise have to unset the values in their own `config.yml`.
270
+
83
271
  Add pages, documents, data, etc. like normal to test your theme's contents.
84
272
  As you make modifications to your theme and to your content, your site will regenerate and
85
273
  you should see the changes in the browser after a refresh, just like normal.
@@ -87,6 +275,8 @@ you should see the changes in the browser after a refresh, just like normal.
87
275
  When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
88
276
  To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-endless.gemspec` accordingly.
89
277
 
278
+
279
+
90
280
  == License
91
281
 
92
282
  The theme is available as open source under the terms of the https://opensource.org/licenses/MIT[MIT License].
@@ -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
- #twitter_username: jekyllrb
30
- #github_username: jekyll
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>
@@ -3,6 +3,113 @@
3
3
  layout: html
4
4
  ---
5
5
 
6
- {% include function_list-pages.html %}
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
+ &copy; {{ 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 }}
@@ -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
+
@@ -1,5 +1,5 @@
1
1
  ---
2
- # Regular page with list of blog posts attached to the end of the content.
2
+ # Regular page with a list of blog posts attached to the end of the content.
3
3
  layout: page
4
4
  ---
5
5
  {{ content }}
@@ -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
+
@@ -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 }}
@@ -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,15 @@
1
+ /**
2
+ * Address bar in the footer.
3
+ */
4
+ address {
5
+ li {
6
+ i {
7
+ display: inline-block;
8
+ padding: 2px 0;
9
+ margin: 2px 0;
10
+ vertical-align: top;
11
+ // Icons should take the same space;
12
+ min-width: 20px;
13
+ }
14
+ }
15
+ }
@@ -1,5 +1,9 @@
1
1
  /*
2
- * Replaced by SCSS-file from the user.
2
+ Simple SCSS-file.
3
3
  */
4
+ $bg: #fff;
4
5
 
6
+ body {
7
+ background-color: $bg;
8
+ }
5
9
 
@@ -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
+ }
@@ -1,10 +1,4 @@
1
1
  /*
2
- Simple SCSS-file.
2
+ * Replaced by SCSS-file from the user.
3
3
  */
4
- $bg: #fff;
5
-
6
- body {
7
- background-color: $bg;
8
- }
9
-
10
4
 
@@ -5,8 +5,11 @@
5
5
 
6
6
  /*
7
7
  * imports _scss/background.scss
8
+ * imports _scss/icons.scss
8
9
  */
9
10
  @import "background";
11
+ @import "address";
12
+ @import "tag-cloud";
10
13
 
11
14
  /*
12
15
  * import SCSS-Code contributed by the user of the theme.
@@ -0,0 +1,8 @@
1
+ module Jekyll
2
+ module Endless
3
+
4
+ end
5
+ end
6
+
7
+ require_relative 'jekyll-theme-endless/generate-tagpages'
8
+
@@ -0,0 +1,80 @@
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
+ module Endless
30
+
31
+ # TagPageGenerator is a subclass of Generator
32
+ class TagPageGenerator < Generator
33
+ safe true
34
+ # A Generator needs to implement the generate method
35
+ def generate(site)
36
+ # If a layout with the name `page-tag` exists
37
+ if site.layouts.key? 'page-tag'
38
+ # The directory in which the files are to be created is configured in `site.tag_dir`.
39
+ # If not, the directory `tags/` is used.
40
+ dir = site.config['tag_dir'] || 'tags'
41
+
42
+ # For each tag in the tag-list:
43
+ site.tags.each_key do |tag|
44
+ # Create a page-object using TagPage and add it to the `site.pages` array
45
+ site.pages << TagPage.new(site, site.source, File.join(dir, tag), tag)
46
+ end
47
+
48
+ end
49
+ end
50
+ end
51
+
52
+ # TagPage is a subclass of Page
53
+ # It is used in the `TagPageGenerator`
54
+ class TagPage < Page
55
+ def initialize(site, base, dir, tag)
56
+ # Define instance variables ('@') to make values available in the super-class `Page`.
57
+ # The variables are available in the layout as e.g. `page.name`.
58
+ @site = site
59
+ @base = base
60
+ @dir = dir
61
+ @name = 'index.html'
62
+
63
+ self.process(@name)
64
+ self.read_yaml(File.join(base, '_layouts'), 'page-tag.html')
65
+
66
+ # The prefix for the generated title is set via `tag_title_prefix` in `_config.yml` and defaults to `Tag: `
67
+ tag_title_prefix = site.config['tag_title_prefix'] || 'Tag: '
68
+ # Generates the title for the tag page and makes it available in the layout file as `page.title`
69
+ self.data['title'] = "#{tag_title_prefix}#{tag}"
70
+ # Makes `page.tag` available in the layout file
71
+ self.data['tag'] = tag
72
+
73
+ end
74
+ end
75
+
76
+ end
77
+
78
+ end
79
+
80
+
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module Endless
3
+ VERSION = '0.3.1'
4
+ end
5
+ end
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.0.1
4
+ version: 0.3.1
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-17 00:00:00.000000000 Z
11
+ date: 2020-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -34,17 +34,25 @@ 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
+ - _sass/address.scss
44
48
  - _sass/background.scss
49
+ - _sass/tag-cloud.scss
45
50
  - _sass/user.scss
46
51
  - assets/css/main.scss
47
- homepage: https://jekyll-theme-endless.gitlab.io
52
+ - lib/jekyll-theme-endless.rb
53
+ - lib/jekyll-theme-endless/generate-tagpages.rb
54
+ - lib/jekyll-theme-endless/version.rb
55
+ homepage: https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io
48
56
  licenses:
49
57
  - MIT
50
58
  metadata: {}
@@ -66,5 +74,5 @@ requirements: []
66
74
  rubygems_version: 3.1.2
67
75
  signing_key:
68
76
  specification_version: 4
69
- summary: A Jekyll theme that was started from scratch.
77
+ summary: A Jekyll theme that was started from scratch. View it on https://jekyll-theme-endless.gitlab.io/.
70
78
  test_files: []