jekyll-theme-endless 0.3.2 → 0.5.0

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: 1b04d7b3586e572280a4fd5247a8eaf94ec4552ce73a9481e51c833fcb6ffdc3
4
- data.tar.gz: 5c18618cdf44c90589548091abb2835f026d66668b46fab51f62e74ec3cac70a
3
+ metadata.gz: bb31bb43fb78dd91b274a5f84a57176b0aea3699eab6b1d3c8a2b992f1e3b79f
4
+ data.tar.gz: 9f53070ae8f360023afa52c96a1d7207fffd392afc84b96a835ff329f5c2b809
5
5
  SHA512:
6
- metadata.gz: af6018f32a44bb618451c96114ff690440f8683721ec866d2ea5acebe81838308297ce98e74c1d720571d79466d39884472821a33c5d245aa3fff72edd3f7a13
7
- data.tar.gz: 27b2e49ee0315ebcc171c65038b20c8a523b78f2d1e400438df31e10e193a4950c50159e21bdddde468d0e903c76a4dac4b448247e807adced8dbbd291495514
6
+ metadata.gz: a5b90be2a585639374d61333397b4deeacb34d243a75406de135882d8ec174bf43eefb8d9c1f67be8d5118d56dfe7cba863ba962863ae43052f52e48904a8a4b
7
+ data.tar.gz: 8ed8555b0301d77081320c5571d3a29aabe41de5127cfa209bf651b667a208c59687d9e233b4fb130c6ac3e062d07ca2f3b9b172888b5dfe8550191ae1f4c435
@@ -3,6 +3,19 @@
3
3
  :page-menu_position: 300
4
4
 
5
5
 
6
+
7
+ `jekyll-theme-endless` is a theme for the static site generator https://jekyllrb.com/[Jekyll].
8
+ The theme is ready to be used with posts written in https://asciidoctor.org/[AsciiDoc] using the
9
+ https://github.com/asciidoctor/jekyll-asciidoc[Jekyll AsciiDoc plugin].
10
+ The syntax of source code is highlighted using https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers[Rouge].
11
+
12
+ The repository of this Jekyll theme is located at:
13
+ https://gitlab.com/jekyll-theme-endless/jekyll-theme-endless.gitlab.io.
14
+ An example page using this theme can be viewed at: https://jekyll-theme-endless.gitlab.io.
15
+ The gem is published on https://rubygems.org/gems/jekyll-theme-endless.
16
+
17
+
18
+
6
19
  == Quicktstart for testing
7
20
 
8
21
  * Clone the repository
@@ -200,6 +213,24 @@ username_xing: XXXX
200
213
  username_linkedin: XXXX
201
214
  ----
202
215
 
216
+ `_includes/function_tag-list.html`::
217
+ Generates a formatted list of tags.
218
+ This is e.g. used to display the tags of a blog post.
219
+
220
+ `_includes/function_show-dates.html`::
221
+ Show the creation date and (if present) the date a blog post was last edited.
222
+ The date of the last edit can be configured by setting a value for the page-variable `lastedit`.
223
+
224
+ In AsciiDoc this would be e.g.:
225
+
226
+ [source, AsciiDoc]
227
+ ----
228
+ :page-lastedit: 2020-10-29
229
+ ----
230
+
231
+ `_includes/function_show-prev-next-navigation.html`::
232
+ Displays links to the previous and the next post of your blog.
233
+
203
234
 
204
235
 
205
236
  === Plugins
@@ -23,6 +23,16 @@ url: "" # the base hostname & protocol for your site, e.g. http://example.com
23
23
 
24
24
 
25
25
 
26
+ # AsciiDoc settings
27
+ asciidoctor:
28
+ attributes:
29
+ # Highlighting source code using rouge
30
+ # https://github.com/asciidoctor/jekyll-asciidoc#stylesheet-for-code-highlighting
31
+ # https://github.com/asciidoctor/jekyll-asciidoc/issues/221#issuecomment-526857488
32
+ source-highlighter: rouge
33
+
34
+
35
+
26
36
  # Theme specific settings
27
37
  # Find example data in _data.yml of the theme repository.
28
38
  # Run `bundle exec jekyll serve --config _config.yml,_data.yml`
@@ -0,0 +1,16 @@
1
+ <div class="text-right">
2
+
3
+ <time class="created" datetime="{{ include.created | date_to_xmlschema }}">
4
+ <span class="sr-only sr-only-focusable">created:</span>
5
+ <strong title="date of creation">{{ include.created | date: "%b %-d, %Y" }}</strong>
6
+ </time>
7
+
8
+ {% if include.edited != "" and include.edited %}
9
+ /
10
+ <time class="edited" datetime="{{ include.edited | date_to_xmlschema }}">
11
+ <span class="sr-only sr-only-focusable">edited:</span>
12
+ <strong title="date of last edit">{{ include.edited | date: "%b %-d, %Y" }}</strong>
13
+ </time>
14
+ {% endif %}
15
+
16
+ </div>
@@ -0,0 +1,19 @@
1
+ <div class="row text-left">
2
+ <div class="col">
3
+ {% if page.next %}
4
+ <a href="{{ page.next.url }}">
5
+ <i class="fa fa-arrow-left d-md-none"></i>
6
+ <span class="d-none d-md-inline">&laquo; {{page.next.title}}</span>
7
+ </a>
8
+ {% endif %}
9
+ </div>
10
+ <div class="col text-right">
11
+ {% if page.previous %}
12
+ <a href="{{ page.previous.url }}">
13
+ <span class="d-none d-md-inline">{{page.previous.title}} &raquo;</span>
14
+ <i class="fa fa-arrow-right d-md-none"></i>
15
+ </a>
16
+ {% endif %}
17
+ </div>
18
+ </div>
19
+
@@ -1,7 +1,24 @@
1
1
  {% comment %}
2
+ Creates a tag cloud with tags beeing sized according to the number of occurences in blog posts.
3
+ {% endcomment %}
2
4
 
5
+ {% comment %}
6
+ Create an empty array.
7
+ {% endcomment %}
8
+ {% assign tags = "" | split:"" %}
9
+
10
+ {% comment %}
11
+ Fill the tags-array with tag-names.
12
+ The push-filter is a Jekyll specific filter.
13
+ {% endcomment %}
14
+ {% for tag in site.tags %}
15
+ {% assign tags = tags | push: tag.first %}
16
+ {% endfor %}
17
+
18
+ {% comment %}
19
+ Sort the tag-array case-insensitive.
3
20
  {% endcomment %}
4
- {% assign tags = site.tags | sort_natural %}
21
+ {% assign tags_sorted = tags | sort_natural %}
5
22
 
6
23
  {% comment %}
7
24
  Requirements:
@@ -16,8 +33,8 @@ Assumption: Non of the tags occurs more than one million times.
16
33
  {% assign min = 1000000 %}
17
34
  {% assign max = 0 %}
18
35
 
19
- {% for tag in tags %}
20
- {% assign postsWithThisTag = tag | last | size %}
36
+ {% for tag in tags_sorted %}
37
+ {% assign postsWithThisTag = site.tags[tag] | size %}
21
38
  {% if postsWithThisTag > max %}
22
39
  {% assign max = postsWithThisTag %}
23
40
  {% endif %}
@@ -31,7 +48,7 @@ Assumption: Non of the tags occurs more than one million times.
31
48
 
32
49
  <ul class="tag-cloud list-unstyled">
33
50
 
34
- {% for tag in tags %}
51
+ {% for tag in tags_sorted %}
35
52
  <li>
36
53
  {% comment %}
37
54
  The size difference should be 150%.
@@ -46,12 +63,12 @@ Assumption: Non of the tags occurs more than one million times.
46
63
  To be on the safe side, create a float (times: 1.0)
47
64
  {% endcomment %}
48
65
 
49
- {% assign number = tag | last | size %}
66
+ {% assign number = site.tags[tag] | size %}
50
67
  {% assign percent = number | times: 1.0 | minus: min | times: sizeDifference | divided_by: steps | plus: 100 %}
51
- {% assign tagname = tag | first | replace:'-', ' ' %}
68
+ {% assign tagname = tag | replace:'-', ' ' %}
52
69
 
53
70
  <a
54
- href = "/{{ site.tag_dir | default: 'tags' }}/{{ tag | first }}"
71
+ href = "/{{ site.tag_dir | default: 'tags' }}/{{ tag }}"
55
72
  style = "font-size: {{ percent }}%"
56
73
  title = "Number of posts with the tag '{{ tagname }}': {{ number }}"
57
74
  >{{ tagname }}</a>
@@ -0,0 +1,15 @@
1
+ {% comment %}
2
+ Generates an unsorted list of tags.
3
+ Requires an array of tags beeing provided via the parameter `tags`.
4
+ {% endcomment %}
5
+ {% assign asize = include.tags | size %}
6
+ {% if asize > 0 %}
7
+ <ul class="list-inline">
8
+ {% for current_tag in include.tags %}
9
+ <li class="list-inline-item"><a
10
+ class="badge badge-pill badge-secondary"
11
+ href="/{{ site.tag_dir | default: 'tags' }}/{{ current_tag }}"
12
+ >{{ current_tag }}</a></li>
13
+ {% endfor %}
14
+ </ul>
15
+ {% endif %}
@@ -51,15 +51,15 @@ layout: html
51
51
 
52
52
 
53
53
  <!-- Page content -->
54
- <main class="container pt-4 pb-5" style="flex-grow: 1;" aria-label="Content">
54
+ <main class="container pt-4" style="flex-grow: 1;" aria-label="Content">
55
55
 
56
56
  <div class="row">
57
57
 
58
- <div class="col-lg-8">
58
+ <div class="col-lg-8 pb-5">
59
59
  {{ content }}
60
60
  </div>
61
61
 
62
- <div class="col-lg-4">
62
+ <div class="col-lg-4 pb-5">
63
63
  <aside>
64
64
  <h3>Blog Navigation</h3>
65
65
 
@@ -8,7 +8,7 @@
8
8
  <meta charset="utf-8">
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
10
10
  <title>
11
- {{ page.title }}
11
+ {{ page.title | default: page.menu_label | strip_html }}
12
12
  </title>
13
13
 
14
14
  <!-- Font-awesome CSS: https://www.bootstrapcdn.com/fontawesome/ -->
@@ -9,6 +9,10 @@ page.tag and page.title are set by the plugin `generate-taglist`.
9
9
  <h1>{{ page.title }}</h1>
10
10
  {% endif %}
11
11
 
12
+ <p>
13
+ Number of posts tagged with "<em>{{ page.tag }}</em>": <strong>{{ site.tags[ page.tag ] | size }}</strong>
14
+ </p>
15
+
12
16
  <ul>
13
17
  {% for post in site.tags[ page.tag ] %}
14
18
 
@@ -1,12 +1,42 @@
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 %}
9
- <h1>{{ page.title }}</h1>
10
- {% endif %}
11
-
12
- {{ content }}
4
+ <article>
5
+ <header>
6
+
7
+ {% comment %}Show link to previous/next post.{% endcomment %}
8
+ {% include function_show-prev-next-navigation.html %}
9
+
10
+ {% comment %}Show dates of the post.{% endcomment %}
11
+ {% include function_show-dates.html
12
+ created = page.date
13
+ edited = page.lastedit
14
+ %}
15
+
16
+ {% comment %}
17
+ In Markdown posts, page.title defaults to parts of the filename.
18
+ Thus, do not use `# Heading` in Blog posts, otherwise two H1-heading will appear.
19
+ {% endcomment %}
20
+ {% if page.title %}
21
+ <h1>{{ page.title }}</h1>
22
+ {% endif %}
23
+
24
+ {% comment %}Show tags of the post.{% endcomment %}
25
+ {% include function_tag-list.html
26
+ tags=page.tags
27
+ %}
28
+
29
+ </header>
30
+
31
+ <div>
32
+ {{ content }}
33
+ </div>
34
+
35
+ {% comment %}Show link to previous/next post.{% endcomment %}
36
+ {% include function_show-prev-next-navigation.html %}
37
+
38
+ </article>
39
+
40
+
41
+
42
+
@@ -0,0 +1,16 @@
1
+ time {
2
+ color: #999;
3
+
4
+ &:before {
5
+ font-family: FontAwesome;
6
+ top:0;
7
+ padding-right:-1px;
8
+
9
+ &.created {
10
+ content: "\f017";
11
+ }
12
+ &.edited {
13
+ content: "\f044";
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Based on "Manni" from https://github.com/jwarby/jekyll-pygments-themes
3
+ */
4
+
5
+ .highlight {
6
+ @at-root pre#{&} { background-color: #f8f8f8; padding: .5em 1em;}
7
+ .hll { background-color: #ffffcc }
8
+ .c { color: #080; font-style: italic } /* Comment */
9
+ .err { color: #AA0000; background-color: #FFAAAA } /* Error */
10
+ .k { color: #006699; font-weight: bold } /* Keyword */
11
+ .o { color: #555555 } /* Operator */
12
+ .cm { color: #080; font-style: italic } /* Comment.Multiline */
13
+ .cp { color: #08F } /* Comment.Preproc */
14
+ .c1 { color: #080; font-style: italic } /* Comment.Single */
15
+ .cs { color: #08F; font-weight: bold; font-style: italic } /* Comment.Special */
16
+ .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
17
+ .ge { font-style: italic } /* Generic.Emph */
18
+ .gr { color: #FF0000 } /* Generic.Error */
19
+ .gh { color: #003300; font-weight: bold } /* Generic.Heading */
20
+ .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
21
+ .go { color: #AAAAAA } /* Generic.Output */
22
+ .gp { color: #000099; font-weight: bold } /* Generic.Prompt */
23
+ .gs { font-weight: bold } /* Generic.Strong */
24
+ .gu { color: #003300; font-weight: bold } /* Generic.Subheading */
25
+ .gt { color: #99CC66 } /* Generic.Traceback */
26
+ .kc { color: #006699; font-weight: bold } /* Keyword.Constant */
27
+ .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */
28
+ .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */
29
+ .kp { color: #006699 } /* Keyword.Pseudo */
30
+ .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */
31
+ .kt { color: #007788; font-weight: bold } /* Keyword.Type */
32
+ .m { color: #FF6600 } /* Literal.Number */
33
+ .s { color: #CC3300 } /* Literal.String */
34
+ .na { color: #330099 } /* Name.Attribute */
35
+ .nb { color: #336666 } /* Name.Builtin */
36
+ .nc { color: #00AA88; font-weight: bold } /* Name.Class */
37
+ .no { color: #336600 } /* Name.Constant */
38
+ .nd { color: #9999FF } /* Name.Decorator */
39
+ .ni { color: #999999; font-weight: bold } /* Name.Entity */
40
+ .ne { color: #CC0000; font-weight: bold } /* Name.Exception */
41
+ .nf { color: #CC00FF } /* Name.Function */
42
+ .nl { color: #9999FF } /* Name.Label */
43
+ .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */
44
+ .nt { color: #330099; font-weight: bold } /* Name.Tag */
45
+ .nv { color: #003333 } /* Name.Variable */
46
+ .ow { color: #000000; font-weight: bold } /* Operator.Word */
47
+ .w { color: #bbbbbb } /* Text.Whitespace */
48
+ .mf { color: #FF6600 } /* Literal.Number.Float */
49
+ .mh { color: #FF6600 } /* Literal.Number.Hex */
50
+ .mi { color: #FF6600 } /* Literal.Number.Integer */
51
+ .mo { color: #FF6600 } /* Literal.Number.Oct */
52
+ .sb { color: #CC3300 } /* Literal.String.Backtick */
53
+ .sc { color: #CC3300 } /* Literal.String.Char */
54
+ .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
55
+ .s2 { color: #CC3300 } /* Literal.String.Double */
56
+ .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */
57
+ .sh { color: #CC3300 } /* Literal.String.Heredoc */
58
+ .si { color: #AA0000 } /* Literal.String.Interpol */
59
+ .sx { color: #CC3300 } /* Literal.String.Other */
60
+ .sr { color: #33AAAA } /* Literal.String.Regex */
61
+ .s1 { color: #CC3300 } /* Literal.String.Single */
62
+ .ss { color: #FFCC33 } /* Literal.String.Symbol */
63
+ .bp { color: #336666 } /* Name.Builtin.Pseudo */
64
+ .vc { color: #003333 } /* Name.Variable.Class */
65
+ .vg { color: #003333 } /* Name.Variable.Global */
66
+ .vi { color: #003333 } /* Name.Variable.Instance */
67
+ .il { color: #FF6600 } /* Literal.Number.Integer.Long */
68
+ }
@@ -10,6 +10,12 @@
10
10
  @import "background";
11
11
  @import "address";
12
12
  @import "tag-cloud";
13
+ @import "posts";
14
+
15
+ /*
16
+ * import styles for highlighting source code that was annotated using rouge.
17
+ */
18
+ @import "rouge-highlight";
13
19
 
14
20
  /*
15
21
  * import SCSS-Code contributed by the user of the theme.
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Endless
3
- VERSION = '0.3.2'
3
+ VERSION = '0.5.0'
4
4
  end
5
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.3.2
4
+ version: 0.5.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-27 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -37,7 +37,10 @@ files:
37
37
  - _includes/content_footer-usernames.html
38
38
  - _includes/function_list-pages.html
39
39
  - _includes/function_list-posts.html
40
+ - _includes/function_show-dates.html
41
+ - _includes/function_show-prev-next-navigation.html
40
42
  - _includes/function_tag-cloud.html
43
+ - _includes/function_tag-list.html
41
44
  - _layouts/default.html
42
45
  - _layouts/html.html
43
46
  - _layouts/page-postlist.html
@@ -46,6 +49,8 @@ files:
46
49
  - _layouts/post.html
47
50
  - _sass/address.scss
48
51
  - _sass/background.scss
52
+ - _sass/posts.scss
53
+ - _sass/rouge-highlight.scss
49
54
  - _sass/tag-cloud.scss
50
55
  - _sass/user.scss
51
56
  - assets/css/main.scss