jekyll-theme-endless 0.0.1 → 0.1.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 +4 -4
- data/README.adoc +106 -0
- data/_config.yml +12 -0
- data/_includes/function_list-pages.html +26 -7
- data/_layouts/default.html +37 -2
- data/_layouts/html.html +11 -1
- data/_layouts/page.html +6 -0
- data/_layouts/post.html +6 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c92dfedce5cc6880471ae7994859fd5b388634e4067407abd00daa28faf4ddb
|
4
|
+
data.tar.gz: e8a8c5fe9a45b37e80442f091f0054f7600cd942e6c7886bdd69eede6ed46875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1712475fc0dcef617efb69fc282d8cf38e791e24355fbbb17b75bd7cc592d6806ec44bc6a8d335b8ad88ca7aa9a79edd113df6b297eef96ee68b7d68a5843404
|
7
|
+
data.tar.gz: af48af0c6da7245c89385b9b34b83952ea12811f56f3fd016feca673b7f3083b0837da59e3a106bb135f9e3de9e89d931436a8c3a214034321354b01f968b4ed
|
data/README.adoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
= jekyll-theme-endless
|
2
2
|
|
3
|
+
|
4
|
+
|
3
5
|
== Installation
|
4
6
|
|
5
7
|
Add this line to your Jekyll site's `Gemfile`:
|
@@ -24,6 +26,20 @@ Or install it yourself as:
|
|
24
26
|
|
25
27
|
$ gem install jekyll-theme-endless
|
26
28
|
|
29
|
+
|
30
|
+
|
31
|
+
== General information
|
32
|
+
|
33
|
+
The theme is styled using https://getbootstrap.com/[Bootstrap] that is added
|
34
|
+
via a content delivery network (CDN; here: https://www.jsdelivr.com/).
|
35
|
+
|
36
|
+
The output of page variables (e.g. `page.title` or `page.menu_label`) is *not escaped* by the theme-layout.
|
37
|
+
The reason is, that Jekyll-AsciiDoc (in contrast to Markdown) escapes HTML by default.
|
38
|
+
Thus, using (unescaped) HTML-commands e.g. in titles of Markdown posts/pages might break the layout.
|
39
|
+
If you want to use Markdown AND have HTML-commands in the title, simply escape them (e.g. use `<` instead of `<`).
|
40
|
+
|
41
|
+
|
42
|
+
|
27
43
|
== Usage
|
28
44
|
|
29
45
|
Here I describe available layouts, includes, sass and/or assets here.
|
@@ -36,15 +52,79 @@ HTML boilerplate code used for all layouts.
|
|
36
52
|
`_layouts/default.html`::
|
37
53
|
Default website structure (menue, tag cloud, ...) used for pages and posts.
|
38
54
|
|
55
|
+
Contains a navigation bar with a configurable brand-label.
|
56
|
+
Set `brand` in your `_config.yml`, to determine what is shown on the left side of the navigation.
|
57
|
+
Example:
|
58
|
+
|
59
|
+
[source, yaml]
|
60
|
+
----
|
61
|
+
brand: '"<i>endless</i>"-Theme'
|
62
|
+
----
|
63
|
+
|
64
|
+
|
39
65
|
`_layouts/page.html`::
|
40
66
|
Layout of page-content.
|
41
67
|
|
68
|
+
Start a new page in *AsciiDoc* by adding a file ending with `.adoc`.
|
69
|
+
Do not forget the `page-`-prefix when setting page variables.
|
70
|
+
Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
|
71
|
+
Thus, you typically do not have to set the layout to `page` or `post`.
|
72
|
+
[source, AsciiDoc]
|
73
|
+
----
|
74
|
+
= Page title
|
75
|
+
:page-layout: page
|
76
|
+
|
77
|
+
Content.
|
78
|
+
----
|
79
|
+
|
80
|
+
Start a new page in *Markdown* by adding a file ending with `.md`.
|
81
|
+
|
82
|
+
[source, Markdown]
|
83
|
+
----
|
84
|
+
---
|
85
|
+
layout: page
|
86
|
+
# Use either a `# Heading` OR set the title in the frontmatter.
|
87
|
+
# Using both will result in two headings.
|
88
|
+
---
|
89
|
+
# Page title
|
90
|
+
|
91
|
+
Content
|
92
|
+
----
|
93
|
+
|
42
94
|
`_layouts/page-postlist.html`::
|
43
95
|
Layout of page-content with a list of blog posts at the end.
|
44
96
|
|
45
97
|
`_layouts/post.html`::
|
46
98
|
Layout of blog-posts.
|
47
99
|
|
100
|
+
Start a new post in *AsciiDoc* by adding a file ending with `.adoc` to the `_posts/`-folder.
|
101
|
+
Do not forget the `page-`-prefix when setting page variables.
|
102
|
+
Jekyll-AsciiDoc has an https://github.com/asciidoctor/jekyll-asciidoc#specifying-a-layout[auto-detection mechanism for the layout].
|
103
|
+
Thus, you typically do not have to set the layout to `page` or `post`.
|
104
|
+
[source, AsciiDoc]
|
105
|
+
----
|
106
|
+
= Page title
|
107
|
+
:page-layout: post
|
108
|
+
|
109
|
+
Content.
|
110
|
+
----
|
111
|
+
|
112
|
+
Start a new post in *Markdown* by adding a file ending with `.md`.
|
113
|
+
|
114
|
+
[source, Markdown]
|
115
|
+
----
|
116
|
+
---
|
117
|
+
layout: post
|
118
|
+
# If the title of the post should be different from parts of the filename,
|
119
|
+
# change it using the title variable.
|
120
|
+
# Using a `# Heading` will result in two headings in the post.
|
121
|
+
title: Page title
|
122
|
+
---
|
123
|
+
|
124
|
+
Content
|
125
|
+
----
|
126
|
+
|
127
|
+
|
48
128
|
|
49
129
|
=== Includes
|
50
130
|
|
@@ -52,6 +132,15 @@ Layout of blog-posts.
|
|
52
132
|
Generates the code containing links to each page.
|
53
133
|
The text of the link is the title of the page.
|
54
134
|
|
135
|
+
If the text should be different from the page-title, set the page variable `menu_label`.
|
136
|
+
In AsciiDoc files this could be e.g.: `:page-menu_label: 'AnotherText'`.
|
137
|
+
|
138
|
+
The order of the links can be determined with the help of the page variable `menu_label`
|
139
|
+
(in AsciiDoc e.g. `:page-menu_position: 100`; in frontmatter e.g. `menu_position: 50`).
|
140
|
+
Pages with higher numbers appear on the left side of the menu.
|
141
|
+
Pages with a negative value for `menu_label` will be hidden from the menu.
|
142
|
+
This can be useful for your 404 page, which should be generated by Jekyll, but not visible in the menu.
|
143
|
+
|
55
144
|
`_includes/function_list-posts.html`::
|
56
145
|
Generates the code containing links to each blog-post.
|
57
146
|
The text of the link is the title of the post.
|
@@ -64,12 +153,27 @@ This file is included by `assets/css/main.scss`.
|
|
64
153
|
|
65
154
|
|
66
155
|
|
156
|
+
== Settings
|
157
|
+
|
158
|
+
=== Language
|
159
|
+
|
160
|
+
The language of the content can be set using `page.lang` which overrides `site.lang`.
|
161
|
+
The default is `en`.
|
162
|
+
|
163
|
+
* use e.g. `:page-lang: en` in AsciiDoc
|
164
|
+
* use e.g. `lang: en` in frontmatter
|
165
|
+
* use e.g. `lang: en` in `_config.yml`
|
166
|
+
|
167
|
+
|
168
|
+
|
67
169
|
== Contributing
|
68
170
|
|
69
171
|
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io.
|
70
172
|
This project is intended to be a safe, welcoming space for collaboration,
|
71
173
|
and contributors are expected to adhere to the http://contributor-covenant.org[Contributor Covenant] code of conduct.
|
72
174
|
|
175
|
+
|
176
|
+
|
73
177
|
== Development
|
74
178
|
|
75
179
|
To set up your environment to develop this theme:
|
@@ -87,6 +191,8 @@ you should see the changes in the browser after a refresh, just like normal.
|
|
87
191
|
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
88
192
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-endless.gemspec` accordingly.
|
89
193
|
|
194
|
+
|
195
|
+
|
90
196
|
== License
|
91
197
|
|
92
198
|
The theme is available as open source under the terms of the https://opensource.org/licenses/MIT[MIT License].
|
data/_config.yml
CHANGED
@@ -29,6 +29,17 @@ url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
|
29
29
|
#twitter_username: jekyllrb
|
30
30
|
#github_username: jekyll
|
31
31
|
|
32
|
+
|
33
|
+
|
34
|
+
# Theme specific settings
|
35
|
+
# Language. Is overriden by value of page.lang.
|
36
|
+
lang: en
|
37
|
+
# Brand is not escaped in the layout.
|
38
|
+
# Thus, HTML-commands can be used.
|
39
|
+
brand: '"<i>endless</i>"-Theme'
|
40
|
+
|
41
|
+
|
42
|
+
|
32
43
|
# Build settings
|
33
44
|
#theme: minima
|
34
45
|
#plugins:
|
@@ -57,3 +68,4 @@ exclude:
|
|
57
68
|
# - vendor/gems/
|
58
69
|
# - vendor/ruby/
|
59
70
|
|
71
|
+
|
@@ -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
|
|
data/_layouts/default.html
CHANGED
@@ -3,6 +3,41 @@
|
|
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
|
+
<a class="navbar-brand" href="{{ "/" | relative_url}}">{{ site.brand }}</a>
|
12
|
+
|
13
|
+
<!-- Burger menu -->
|
14
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
15
|
+
<span class="navbar-toggler-icon"></span>
|
16
|
+
</button>
|
17
|
+
|
18
|
+
<!-- Page links -->
|
19
|
+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
20
|
+
<ul class="navbar-nav mr-auto">
|
21
|
+
|
22
|
+
{% include function_list-pages.html %}
|
23
|
+
|
24
|
+
</ul>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
</nav>
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
<!-- Page content -->
|
33
|
+
<main class="container" aria-label="Content">
|
34
|
+
|
35
|
+
{{ content }}
|
36
|
+
|
37
|
+
</main>
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
<!-- Footer -->
|
42
|
+
|
7
43
|
|
8
|
-
{{ content }}
|
data/_layouts/html.html
CHANGED
@@ -3,17 +3,27 @@
|
|
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
|
+
<!-- Bootstrap CSS -->
|
15
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha256-93wNFzm2GO3EoByj9rKZCwGjAJAwr0nujPaOgwUt8ZQ=" crossorigin="anonymous">
|
12
16
|
<link rel="stylesheet" href="/assets/css/main.css">
|
17
|
+
|
13
18
|
</head>
|
14
19
|
<body>
|
15
20
|
|
16
21
|
{{ content }}
|
17
22
|
|
23
|
+
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
24
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-jXCJJT3KKcnNjZ3rfsabCj1EX4j2omR4xxm+H5CtywE=" crossorigin="anonymous"></script>
|
25
|
+
|
18
26
|
</body>
|
19
27
|
</html>
|
28
|
+
|
29
|
+
|
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 }}
|
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
|
4
|
+
version: 0.1.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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,7 +44,7 @@ files:
|
|
44
44
|
- _sass/background.scss
|
45
45
|
- _sass/user.scss
|
46
46
|
- assets/css/main.scss
|
47
|
-
homepage: https://jekyll-theme-endless.gitlab.io
|
47
|
+
homepage: https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io
|
48
48
|
licenses:
|
49
49
|
- MIT
|
50
50
|
metadata: {}
|
@@ -66,5 +66,5 @@ requirements: []
|
|
66
66
|
rubygems_version: 3.1.2
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
|
-
summary: A Jekyll theme that was started from scratch.
|
69
|
+
summary: A Jekyll theme that was started from scratch. View it on https://jekyll-theme-endless.gitlab.io/.
|
70
70
|
test_files: []
|