jekyll-feed 0.17.0 → 0.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 218e5f581b3f29f0f04eb49800c27b61cecb2ec769882ef2aa00008db2d6bd1a
4
- data.tar.gz: b3f1ed32d77b488d45c5fcea9540224d2d340660b37db61958b4cd24d37e3bcc
3
+ metadata.gz: da9056c2c44badd5c199ed742ea665ad315fa7c6a1924a5ee659a9167a069ea9
4
+ data.tar.gz: addb0b079cc0de3c0217bd9ce525ce9272f84d02a463ae15d7a3076ee13bc82b
5
5
  SHA512:
6
- metadata.gz: 2b6f1f23ae300ac0caad7a2123e73fb0ea403a9481a1bf71c90b07a166e91c4f64576d48606c960452e431fc1d26cb1531a6649dd622ad0d9c80722edc2a8d3c
7
- data.tar.gz: de139bea2ba933414be45fcc6a4fe9e8e7431e8b7ea0bccc2df365121748e4bf07cd9020968670889c84688cc080ce22dc576b1d3936b8c34c07f7eabac727c5
6
+ metadata.gz: 44ccc5f9288c5d4f394ed8674444fbefd504ba5eb9e64c821cdcc501aa1b12c2f4f2195ae1d60820954d826f81e2485676e0c855fbde206854170134decbf95d
7
+ data.tar.gz: 26d328fc69fb541a438b81177d2739a168483731dea9923446a0226e82ff5df8f7fe331647c27541a5285613341b9f006d1f92daf2d0e370cc2cb8cf63fdc125
data/History.markdown CHANGED
@@ -1,3 +1,23 @@
1
+ ## 0.18.0 / 2026-09-29
2
+
3
+ ### Security
4
+
5
+ * Escape `xml:lang` values and CDATA terminators in the feed (GHSA-3gx8-pqcm-38hw, #396)
6
+
7
+ ### Development Fixes
8
+
9
+ * Upgrade to Rake 13 to fix master (#381)
10
+ * feat(CI): Add Ruby 3.2/3.3 to the test matrix (#402)
11
+ * Fix style offenses (#414)
12
+
13
+ ### Documentation
14
+
15
+ * Fix typos in Readme (#384)
16
+
17
+ ### Minor Enhancements
18
+
19
+ * Icon and logo support with simple tests (#412)
20
+
1
21
  ## 0.17.0 / 2022-10-14
2
22
 
3
23
  ### Documentation
@@ -139,8 +159,6 @@
139
159
 
140
160
  * fix <entry> template for posts with post.lang defined (#168)
141
161
 
142
- ## 0.9.3 / 2017-03-28
143
-
144
162
  ## 0.9.1 / 2017-02-17
145
163
 
146
164
  ### Minor Enhancements
data/README.md CHANGED
@@ -33,6 +33,15 @@ The plugin will automatically use any of the following configuration variables,
33
33
  * `description` - A longer description of what your site is about, e.g., "Where I blog about Jekyll and other awesome things"
34
34
  * `url` - The URL to your site, e.g., `https://example.com`. If none is provided, the plugin will try to use `site.github.url`.
35
35
  * `author` - Global author information (see below)
36
+ * `feed.icon` - Icon with 1:1 proportions for readers to use for the blog feed (not supported by all readers; often overridden by a favicon or site icon)
37
+ * `feed.logo` - Logo with 2:1 proportions for readers to use for the blog feed (not supported by all readers).
38
+ For example, both of the preceding can be expressed:
39
+ ```yml
40
+ feed:
41
+ icon: /images/icon.png
42
+ logo: /images/logo.png
43
+ ```
44
+
36
45
 
37
46
  ### Already have a feed path?
38
47
 
@@ -70,7 +79,7 @@ Additionally, the plugin will use the following values, if present in a post's Y
70
79
 
71
80
  There are several ways to convey author-specific information. Author information is found in the following order of priority:
72
81
 
73
- 1. An `author` object, in the documents's front matter, e.g.:
82
+ 1. An `author` object, in the document's front matter, e.g.:
74
83
 
75
84
  ```yml
76
85
  author:
@@ -181,7 +190,7 @@ feed:
181
190
  path: "/changes.atom"
182
191
  ```
183
192
 
184
- Finally, collections can also have category feeds which are outputted as `/feed/<COLLECTION>/<CATEGORY>.xml`. Specify categories like so:
193
+ Finally, collections can also have category feeds that are outputted as `/feed/<COLLECTION>/<CATEGORY>.xml`. Specify categories like so:
185
194
 
186
195
  ```yml
187
196
  feed:
@@ -197,15 +206,15 @@ feed:
197
206
 
198
207
  Optional flag `excerpt_only` allows you to exclude post content from the Atom feed. Default value is `false` for backward compatibility.
199
208
 
200
- When in `config.yml` is `true` than all posts in feed will be without `<content>` tags.
209
+ When in `config.yml` is `true` then all posts in feed will be without `<content>` tags.
201
210
 
202
211
  ```yml
203
212
  feed:
204
213
  excerpt_only: true
205
214
  ```
206
215
 
207
- The same flag can be used directly in post file. It will be disable `<content>` tag for selected post.
208
- Settings in post file has higher priority than in config file.
216
+ The same flag can be used directly in post file. It will disable `<content>` tag for selected post.
217
+ Settings in post file have higher priority than in config file.
209
218
 
210
219
  ## Tags
211
220
 
@@ -2,10 +2,10 @@
2
2
  {% if page.xsl %}
3
3
  <?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?>
4
4
  {% endif %}
5
- <feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
5
+ <feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang | xml_escape }}"{% endif %}>
6
6
  <generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
7
7
  <link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
8
- <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
8
+ <link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang | xml_escape }}" {% endif %}/>
9
9
  <updated>{{ site.time | date_to_xmlschema }}</updated>
10
10
  <id>{{ page.url | absolute_url | xml_escape }}</id>
11
11
 
@@ -27,6 +27,22 @@
27
27
  <subtitle>{{ site.description | xml_escape }}</subtitle>
28
28
  {% endif %}
29
29
 
30
+ {% if site.feed.icon %}
31
+ {% assign feed_icon = site.feed.icon %}
32
+ {% unless feed_icon contains "://" %}
33
+ {% assign feed_icon = feed_icon | absolute_url %}
34
+ {% endunless %}
35
+ <icon>{{ feed_icon | xml_escape }}</icon>
36
+ {% endif %}
37
+
38
+ {% if site.feed.logo %}
39
+ {% assign feed_logo = site.feed.logo %}
40
+ {% unless feed_logo contains "://" %}
41
+ {% assign feed_logo = feed_logo | absolute_url %}
42
+ {% endunless %}
43
+ <logo>{{ feed_logo | xml_escape }}</logo>
44
+ {% endif %}
45
+
30
46
  {% if site.author %}
31
47
  <author>
32
48
  <name>{{ site.author.name | default: site.author | xml_escape }}</name>
@@ -52,8 +68,10 @@
52
68
  {% endunless %}
53
69
  {% assign posts = posts | sort: "date" | reverse %}
54
70
  {% assign posts_limit = site.feed.posts_limit | default: 10 %}
71
+ {% assign cdata_end_token = "]]>" %}
72
+ {% assign cdata_end_token_escaped = "]]]]><![CDATA[>" %}
55
73
  {% for post in posts limit: posts_limit %}
56
- <entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
74
+ <entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang | xml_escape }}"{% endif %}>
57
75
  {% assign post_title = post.title | smartify | strip_html | normalize_whitespace | xml_escape %}
58
76
 
59
77
  <title type="html">{{ post_title }}</title>
@@ -63,7 +81,7 @@
63
81
  <id>{{ post.id | absolute_url | xml_escape }}</id>
64
82
  {% assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only %}
65
83
  {% unless excerpt_only %}
66
- <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip }}]]></content>
84
+ <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip | replace: cdata_end_token, cdata_end_token_escaped }}]]></content>
67
85
  {% endunless %}
68
86
 
69
87
  {% assign post_author = post.author | default: post.authors[0] | default: site.author %}
@@ -96,7 +114,7 @@
96
114
 
97
115
  {% assign post_summary = post.description | default: post.excerpt %}
98
116
  {% if post_summary and post_summary != empty %}
99
- <summary type="html"><![CDATA[{{ post_summary | strip_html | normalize_whitespace }}]]></summary>
117
+ <summary type="html"><![CDATA[{{ post_summary | strip_html | normalize_whitespace | replace: cdata_end_token, cdata_end_token_escaped }}]]></summary>
100
118
  {% endif %}
101
119
 
102
120
  {% assign post_image = post.image.path | default: post.image %}
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Feed
5
- VERSION = "0.17.0"
5
+ VERSION = "0.18.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-feed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-15 00:00:00.000000000 Z
11
+ date: 2026-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '12.0'
67
+ version: '13.0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '12.0'
74
+ version: '13.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rspec
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.3.7
161
+ rubygems_version: 3.1.6
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: A Jekyll plugin to generate an Atom feed of your Jekyll posts