jekyll-theme-nix 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -2
  3. data/feed.xml +112 -0
  4. data/sitemap.xml +44 -0
  5. metadata +14 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d825a61dffc85243635131573be5e34127eda05c9851c352d62e44fbf8d3db0
4
- data.tar.gz: a72c48b318b8910dcd8116b1a3b3d63621feab833cd628e83cbf1641b552705a
3
+ metadata.gz: ae94f36600dbc3cc7167c23169b6fca39cfc224aaa1d199592cf89c5ea950242
4
+ data.tar.gz: d4279c29243b00ed7dbf74bd699cdb1e962183852aaeaa26e4191b73241b2b43
5
5
  SHA512:
6
- metadata.gz: 2099ca9400e23da9a4a2cd49b20a58d8f1701565ac331564297ac12e5566b72e34af4b1bce3c263509aeece4f5cb3a246da06b4bd1484ca2b8e5c60dd933ff9d
7
- data.tar.gz: 9b7694206e58366a5c3d53a0bdfc7054d13be115432e3f9fbe50e48f50baf5bef8a4206c43511dc566b13efa66e4bb99d7a5b0a9ea2c54049571399e745a8aac
6
+ metadata.gz: acf6d30f47be537b5d946ff2b12d0383c6dbb5f78991b6a9589b6c7cbef43ae8872fdbd6638b92511792d6f751462561d079b94890ed1c7892c72ebfdc3a343b
7
+ data.tar.gz: 255561221bede90de53e221150b78490702f770bfebe3e170fbd1f134de2793d84cbe76f56e896b0f961177bce394c53935ceac8ca201bfe0586e59140729b02
data/README.md CHANGED
@@ -1,11 +1,15 @@
1
1
  # Jekyll Theme Nix
2
2
 
3
- A barebones theme for [Jekyll](https://github.com/jekyll/jekyll), which doesn't need any dependencies except `jekyll-redirect-from`, if you want to redirect pages.
3
+ A barebones theme for [Jekyll](https://github.com/jekyll/jekyll), which doesn't need any dependencies except `jekyll-redirect-from`, if you want to redirect pages. It is optimized for fast build speeds as well.
4
4
 
5
5
  Its purpose is to be a minimalistic, single-author theme. Because there is no menu, pages can be manually linked in the body of `index.md`.
6
6
 
7
7
  It also changes as little as possible from the default browser settings to improve legibility.
8
8
 
9
+ [Demo](https://jekyll-theme-nix.michaelnordmeyer.com/)
10
+
11
+ If this theme feels to bloated to you, you can try [<q>Nixer</q>](https://github.com/michaelnordmeyer/jekyll-theme-nixer), the ultra-minimalistic version of <q>Nix</q>.
12
+
9
13
  ## Limited Features
10
14
 
11
15
  - Dark mode, because we want to be respectful
@@ -60,7 +64,7 @@ And add this line to your Jekyll site's `_config.yml`:
60
64
  theme: jekyll-theme-nix
61
65
  ```
62
66
 
63
- Make sure that this is the only `theme:` in `_config.yml`.
67
+ Make sure that this is the only `theme:` in `_config.yml`. Afterwards run `bundle install`.
64
68
 
65
69
  ### Installation as Remote Theme
66
70
 
@@ -79,3 +83,9 @@ remote_theme: michaelnordmeyer/jekyll-theme-nix
79
83
  Make sure that this is the only `remote_theme:` in `_config.yml`, and that there are no other `theme:`.
80
84
 
81
85
  Finally, add `jekyll-remote-theme` to your plugin section in `_config.yml` as well.
86
+
87
+ ## Feed.xml and Sitemap.xml
88
+
89
+ Both are included in the theme and don't need dependencies to `jekyll-feed` or `jekyll-sitemap`. For a standard Jekyll installation, they work out-of-the-box.
90
+
91
+ If hosted with the Github pages plugin, those plugins are already included and will automatically be used instead. To overwrite this, both files have to be copied manually from the theme's repository root to the site's repository root.
data/feed.xml ADDED
@@ -0,0 +1,112 @@
1
+ ---
2
+ permalink: /feed.xml
3
+ redirect_from: /feed
4
+ sitemap: false
5
+ layout: none
6
+ ---
7
+ <?xml version="1.0" encoding="utf-8"?>
8
+ {% if page.xsl %}
9
+ <?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?>
10
+ {% endif %}
11
+ <feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
12
+ <link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
13
+ <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
14
+ <updated>{{ site.time | date_to_xmlschema }}</updated>
15
+ <id>{{ page.url | absolute_url | xml_escape }}</id>
16
+ {%- assign title = site.title | default: site.name -%}
17
+ {%- if page.collection and page.collection != "posts" -%}
18
+ {%- assign collection = page.collection | capitalize -%}
19
+ {%- assign title = title | append: site.title_separator | append: collection -%}
20
+ {%- endif -%}
21
+ {%- if page.category -%}
22
+ {%- assign category = page.category | capitalize -%}
23
+ {%- assign title = title | append: site.title_separator | append: category -%}
24
+ {%- endif -%}
25
+ {%- if title %}
26
+ <title type="html">{{ title | smartify | xml_escape }}</title>
27
+ {%- endif -%}
28
+ {%- if site.description %}
29
+ <subtitle>{{ site.description | smartify }}</subtitle>
30
+ {%- endif -%}
31
+ {%- if site.author %}
32
+ <author>
33
+ <name>{{ site.author.name | default: site.author | xml_escape }}</name>
34
+ {%- if site.author.email %}
35
+ <email>{{ site.author.email | xml_escape }}</email>
36
+ {%- endif -%}
37
+ {%- if site.author.uri %}
38
+ <uri>{{ site.author.uri | xml_escape }}</uri>
39
+ {%- endif %}
40
+ </author>
41
+ {%- endif -%}
42
+ {%- comment -%}
43
+ {%- if page.tags -%}
44
+ {%- assign posts = site.tags[page.tags] -%}
45
+ {%- else -%}
46
+ {%- assign posts = site[page.collection] -%}
47
+ {%- endif -%}
48
+ {%- if page.category -%}
49
+ {%- assign posts = posts | where: "categories", page.category -%}
50
+ {%- endif -%}
51
+ {%- endcomment -%}
52
+ {%- unless posts -%}
53
+ {%- assign posts = site.posts -%}
54
+ {%- endunless -%}
55
+ {%- unless site.show_drafts -%}
56
+ {%- assign posts = posts | where_exp: "post", "post.draft != true" -%}
57
+ {%- endunless -%}
58
+ {%- assign posts = posts | sort: "date" | reverse -%}
59
+ {%- assign posts_limit = site.feed.posts_limit | default: 10 -%}
60
+ {%- for post in posts limit: posts_limit %}
61
+ <entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
62
+ {%- assign post_title = post.title | smartify | strip_html | normalize_whitespace %}
63
+ <title type="html">{{ post_title }}</title>
64
+ <link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post_title }}" />
65
+ <published>{{ post.date | date_to_xmlschema }}</published>
66
+ <updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
67
+ <id>{{ post.id | absolute_url | xml_escape }}</id>
68
+
69
+ {%- assign post_author = post.author | default: post.authors[0] | default: site.author -%}
70
+ {%- assign post_author = site.data.authors[post_author] | default: post_author -%}
71
+ {%- assign post_author_email = post_author.email | default: nil -%}
72
+ {%- assign post_author_uri = post_author.uri | default: nil -%}
73
+ {%- assign post_author_name = post_author.name | default: post_author %}
74
+ <author>
75
+ <name>{{ post_author_name | default: "" | xml_escape }}</name>
76
+ {%- if post_author_email %}
77
+ <email>{{ post_author_email | xml_escape }}</email>
78
+ {%- endif -%}
79
+ {%- if post_author_uri %}
80
+ <uri>{{ post_author_uri | xml_escape }}</uri>
81
+ {%- endif %}
82
+ </author>
83
+ {%- if post.category %}
84
+ <category term="{{ post.category | xml_escape }}" />
85
+ {%- elsif post.categories -%}
86
+ {%- for category in post.categories %}
87
+ <category term="{{ category | xml_escape }}" />
88
+ {%- endfor -%}
89
+ {%- endif %}
90
+ {%- for tag in post.tags %}
91
+ <category term="{{ tag | xml_escape }}" />
92
+ {%- endfor -%}
93
+ {%- assign post_summary = post.description | default: post.excerpt -%}
94
+ {%- if post_summary and post_summary != empty %}
95
+ <summary type="html"><![CDATA[{{ post_summary | strip_html | normalize_whitespace | smartify }}]]></summary>
96
+ {%- endif -%}
97
+
98
+ {%- assign post_image = post.image.path | default: post.image -%}
99
+ {%- if post_image -%}
100
+ {%- unless post_image contains "://" -%}
101
+ {%- assign post_image = post_image | absolute_url | xml_escape -%}
102
+ {%- endunless %}
103
+ <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image | xml_escape }}" />
104
+ <media:content xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image | xml_escape }}" medium="image" />
105
+ {%- endif -%}
106
+ {%- assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only -%}
107
+ {%- unless excerpt_only %}
108
+ <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip | smartify }}]]></content>
109
+ {%- endunless %}
110
+ </entry>
111
+ {%- endfor %}
112
+ </feed>
data/sitemap.xml ADDED
@@ -0,0 +1,44 @@
1
+ ---
2
+ permalink: /sitemap.xml
3
+ sitemap: false
4
+ layout: none
5
+ ---
6
+ <?xml version="1.0" encoding="UTF-8"?>
7
+ {%- if page.xsl %}
8
+ <?xml-stylesheet type="text/xsl" href="{{ "/sitemap.xsl" | absolute_url }}"?>
9
+ {%- endif %}
10
+ <urlset
11
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
13
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
14
+ {%- assign collections = site.collections | where_exp:'collection','collection.output != false' -%}
15
+ {%- for collection in collections -%}
16
+ {%- assign docs = collection.docs | where_exp:'doc','doc.sitemap != false' -%}
17
+ {%- for doc in docs %}
18
+ <url>
19
+ <loc>{{ doc.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
20
+ {%- if doc.last_modified_at or doc.date %}
21
+ <lastmod>{{ doc.last_modified_at | default: doc.date | date_to_xmlschema }}</lastmod>
22
+ {%- endif %}
23
+ </url>
24
+ {% endfor -%}
25
+ {%- endfor -%}
26
+
27
+ {%- assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/404.html"' -%}
28
+ {%- for page in pages %}
29
+ <url>
30
+ <loc>{{ page.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
31
+ {%- if page.last_modified_at %}
32
+ <lastmod>{{ page.last_modified_at | date_to_xmlschema }}</lastmod>
33
+ {%- endif %}
34
+ </url>
35
+ {% endfor -%}
36
+
37
+ {%- assign static_files = page.static_files | where_exp:'page','page.sitemap != false' | where_exp:'page','page.name != "404.html"' -%}
38
+ {%- for file in static_files %}
39
+ <url>
40
+ <loc>{{ file.path | absolute_url | xml_escape }}</loc>
41
+ <lastmod>{{ file.modified_time | date_to_xmlschema }}</lastmod>
42
+ </url>
43
+ {% endfor %}
44
+ </urlset>
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-nix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Nordmeyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.3'
19
+ version: 3.9.3
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 3.9.3
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '4.3'
32
+ version: '5.0'
27
33
  description:
28
34
  email:
29
35
  - michaelnordmeyer@users.noreply.github.com
@@ -39,6 +45,8 @@ files:
39
45
  - _layouts/home.html
40
46
  - _layouts/page.html
41
47
  - _layouts/post.html
48
+ - feed.xml
49
+ - sitemap.xml
42
50
  homepage: https://github.com/michaelnordmeyer/jekyll-theme-nix
43
51
  licenses:
44
52
  - MIT