jekyll-whiteglass 1.0.1 → 1.1.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
  SHA1:
3
- metadata.gz: b61815739a94198760b23ae047d7c8ee65d6ff81
4
- data.tar.gz: 937618222812f191368d120bb2f86885ef691608
3
+ metadata.gz: 63aa02a5b6d3136a454187cf4994f25b151b1d73
4
+ data.tar.gz: e117b9fca20846da65bcb9ce520ccd73db92531d
5
5
  SHA512:
6
- metadata.gz: 97214c89eab9ca729b12f00716a0dd2c8ae0a543ab405b5ce7a1718d6bf343a7a70f4fa07481f741c01852df71b6b1bed4e0cb3f7f0af876edaea59b63188bcc
7
- data.tar.gz: 1e75b861ba57787c2438ac32881bba8d375c80d4113ead23db6c46a50f6ec507f6aa84a76bb3109c0e16aef2720b6048b72c7c5d5e6c2b51d341998973a7ac34
6
+ metadata.gz: e1081b9b04a26374f356690ffbd6320a6c78417b73fa826538c0d02e215cc066ff877ba05ac65928f0091ab916b6c63c26059fdb1a3f92e431f2766bd4290277
7
+ data.tar.gz: 6c5bce4eaf6e750f0e8228d01f4ae082363a88b915825ef1585ffb75203e9e8cf133104bc8666388274bf225fd62e57cef899ad94c0dd9f2a5a5f31f225d8e3a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.1.0 (2017-01-07)
4
+
5
+ - Make feed path configurable
6
+ - Empty `head_custom.html` to prevent adding comments
7
+
3
8
  ## 1.0.1 (2017-01-07)
4
9
 
5
10
  - Fix RSS feed URL
data/README.md CHANGED
@@ -41,11 +41,22 @@ gem install jekyll-whiteglass
41
41
  To override the default structure and style of whiteglass, simply create the
42
42
  concerned directory at the root of your site, copy the file you wish to
43
43
  customize to that directory, and then edit the file. e.g., to override the
44
- [`_includes/head_custom.html`](_includes/head_custom.html) file to specify a
45
- custom style path, create an `_includes` directory, copy
46
- `_includes/head_custom.html` from jekyll-whiteglass gem folder to
44
+ [`_includes/footer_content.html`](_includes/footer_content.html) file to add
45
+ contents to footer, create an `_includes` directory, copy
46
+ `_includes/footer_content.html` from jekyll-whiteglass gem folder to
47
47
  `<your-site>/_includes` and start editing that file.
48
48
 
49
+ For example, you can add favicons to `_includes/head_custom.html`:
50
+
51
+ ``` html
52
+ <link href="{{ "/favicon.png" | relative_url }}" rel="icon">
53
+ <link href="{{ "/apple-touch-icon.png" | relative_url }}" rel="apple-touch-icon">
54
+ <link href="{{ "/apple-touch-icon-76x76.png" | relative_url }}" rel="apple-touch-icon" sizes="76x76">
55
+ <link href="{{ "/apple-touch-icon-120x120.png" | relative_url }}" rel="apple-touch-icon" sizes="120x120">
56
+ <link href="{{ "/apple-touch-icon-152x152.png" | relative_url }}" rel="apple-touch-icon" sizes="152x152">
57
+ <link href="{{ "/apple-touch-icon-180x180.png" | relative_url }}" rel="apple-touch-icon" sizes="180x180">
58
+ ```
59
+
49
60
  The site's default CSS is in the gem itself,
50
61
  [`assets/main.scss`](assets/main.scss). To override the default CSS, the file
51
62
  has to exist at your site source. Do either of the following:
@@ -111,6 +122,26 @@ categories:
111
122
  - Idea
112
123
  ```
113
124
 
125
+ ### Feed
126
+
127
+ Create `<your-site>/feed.xml` with:
128
+
129
+ ``` yaml
130
+ ---
131
+ layout: feed
132
+ ---
133
+ ```
134
+
135
+ If you want to use another path for feed, you can specify a non-default path via
136
+ your site's config.
137
+
138
+ ``` yaml
139
+ feed:
140
+ path: atom.xml
141
+ ```
142
+
143
+ Then create `<your-site>/atom.xml` with the same content of `feed.xml` above.
144
+
114
145
  ### Metadata for SEO
115
146
 
116
147
  #### Keywords
@@ -1 +1,5 @@
1
- &copy; {{ site.author }} - Subscribe via <a href="{{ "/feed.xml" | relative_url }}">RSS</a>
1
+ {% assign feed_path = "/feed.xml" %}
2
+ {% if site.feed and site.feed.path %}
3
+ {% assign feed_path = site.feed.path %}
4
+ {% endif %}
5
+ &copy; {{ site.author }} - Subscribe via <a href="{{ feed_path | absolute_url }}">RSS</a>
data/_includes/head.html CHANGED
@@ -12,7 +12,11 @@
12
12
 
13
13
  <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
14
14
  <link rel="canonical" href="{{ canonical }}">
15
- <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
15
+ {% assign feed_path = "/feed.xml" %}
16
+ {% if site.feed and site.feed.path %}
17
+ {% assign feed_path = site.feed.path %}
18
+ {% endif %}
19
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ feed_path | absolute_url }}">
16
20
 
17
21
  {% include head_custom.html %}
18
22
 
@@ -1,10 +0,0 @@
1
- <!--
2
- You can specify additional content for head here. Here are some examples.
3
-
4
- <link href="{{ "/favicon.png" | relative_url }}" rel="icon">
5
- <link href="{{ "/apple-touch-icon.png" | relative_url }}" rel="apple-touch-icon">
6
- <link href="{{ "/apple-touch-icon-76x76.png" | relative_url }}" rel="apple-touch-icon" sizes="76x76">
7
- <link href="{{ "/apple-touch-icon-120x120.png" | relative_url }}" rel="apple-touch-icon" sizes="120x120">
8
- <link href="{{ "/apple-touch-icon-152x152.png" | relative_url }}" rel="apple-touch-icon" sizes="152x152">
9
- <link href="{{ "/apple-touch-icon-180x180.png" | relative_url }}" rel="apple-touch-icon" sizes="180x180">
10
- -->
data/_layouts/feed.xml CHANGED
@@ -1,34 +1,92 @@
1
1
  ---
2
2
  layout: null
3
3
  ---
4
- <?xml version="1.0" encoding="UTF-8"?>
5
- <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6
- <channel>
7
- <title>{{ site.title | xml_escape }}</title>
8
- <description>{{ site.description | xml_escape }}</description>
9
- <link>{{ site.url }}{{ site.baseurl }}/</link>
10
- <atom:link href="{{ "/atom.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
11
- <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
12
- <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
13
- <generator>Jekyll v{{ jekyll.version }}</generator>
14
- {% for post in site.posts limit:20 %}
15
- <item>
16
- {% if post.external-url %}
17
- <title>{{ post.title | append: " &rarr;" | xml_escape }}</title>
18
- {% else %}
19
- <title>{{ post.title | xml_escape }}</title>
20
- {% endif %}
21
- <description>{{ post.content | xml_escape }}</description>
22
- <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
23
- <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
24
- <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
25
- {% for tag in post.tags %}
26
- <category>{{ tag | xml_escape }}</category>
27
- {% endfor %}
28
- {% for cat in post.categories %}
29
- <category>{{ cat | xml_escape }}</category>
30
- {% endfor %}
31
- </item>
32
- {% endfor %}
33
- </channel>
34
- </rss>
4
+ <?xml version="1.0" encoding="utf-8"?>
5
+ <feed xmlns="http://www.w3.org/2005/Atom"{% if site.lang %} xml:lang="{{ site.lang }}"{% endif %}>
6
+ <generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
7
+ {% assign feed_path = "/feed.xml" %}
8
+ {% if site.feed and site.feed.path %}
9
+ {% assign feed_path = site.feed.path %}
10
+ {% endif %}
11
+ <link href="{{ feed_path | absolute_url }}" rel="self" type="application/atom+xml" />
12
+ <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
13
+ <updated>{{ site.time | date_to_xmlschema }}</updated>
14
+ <id>{{ '/' | absolute_url | xml_escape }}/</id>
15
+
16
+ {% if site.title %}
17
+ <title type="html">{{ site.title | smartify | xml_escape }}</title>
18
+ {% elsif site.name %}
19
+ <title type="html">{{ site.name | smartify | xml_escape }}</title>
20
+ {% endif %}
21
+
22
+ {% if site.description %}
23
+ <subtitle>{{ site.description | xml_escape }}</subtitle>
24
+ {% endif %}
25
+
26
+ {% if site.author %}
27
+ <author>
28
+ <name>{{ site.author.name | default: site.author | xml_escape }}</name>
29
+ {% if site.author.email %}
30
+ <email>{{ site.author.email | xml_escape }}</email>
31
+ {% endif %}
32
+ {% if site.author.uri %}
33
+ <uri>{{ site.author.uri | xml_escape }}</uri>
34
+ {% endif %}
35
+ </author>
36
+ {% endif %}
37
+
38
+ {% for post in site.posts limit: 20 %}
39
+ {% unless post.draft %}
40
+ <entry{% if post.lang %} xml:lang="{{ post.lang }}"{% endif %}>
41
+ {% if post.external-url %}
42
+ <title type="html">{{ post.title | append: " &rarr;" | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
43
+ {% else %}
44
+ <title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
45
+ {% endif %}
46
+ <link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
47
+ <published>{{ post.date | date_to_xmlschema }}</published>
48
+ <updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
49
+ <id>{{ post.id | absolute_url | xml_escape }}</id>
50
+ <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
51
+
52
+ {% assign post_author = post.author | default: post.authors[0] | default: site.author %}
53
+ {% assign post_author = site.data.authors[post_author] | default: post_author %}
54
+ {% assign post_author_email = post_author.email | default: nil %}
55
+ {% assign post_author_uri = post_author.uri | default: nil %}
56
+ {% assign post_author_name = post_author.name | default: post_author %}
57
+
58
+ {% if post_author %}
59
+ <author>
60
+ <name>{{ post_author_name | xml_escape }}</name>
61
+ {% if post_author_email %}
62
+ <email>{{ post_author_email | xml_escape }}</email>
63
+ {% endif %}
64
+ {% if post_author_uri %}
65
+ <uri>{{ post_author_uri | xml_escape }}</uri>
66
+ {% endif %}
67
+ </author>
68
+ {% endif %}
69
+
70
+ {% for category in post.categories %}
71
+ <category term="{{ category | xml_escape }}" />
72
+ {% endfor %}
73
+
74
+ {% for tag in post.tags %}
75
+ <category term="{{ tag | xml_escape }}" />
76
+ {% endfor %}
77
+
78
+ {% if post.excerpt and post.excerpt != empty %}
79
+ <summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
80
+ {% endif %}
81
+
82
+ {% assign post_image = post.twitter_card.image | default: post.facebook.image %}
83
+ {% if post_image %}
84
+ {% unless post_image contains "://" %}
85
+ {% assign post_image = post_image | absolute_url | xml_escape %}
86
+ {% endunless %}
87
+ <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image }}" />
88
+ {% endif %}
89
+ </entry>
90
+ {% endunless %}
91
+ {% endfor %}
92
+ </feed>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-whiteglass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chayoung You
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '10.0'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '10.0'
96
+ version: '0'
97
97
  description:
98
98
  email:
99
99
  - yousbe@gmail.com
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.5.2
148
+ rubygems_version: 2.6.8
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Minimal, responsible Jekyll theme for hackers.