jekyll-feed 0.16.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 +4 -4
- data/History.markdown +34 -2
- data/README.md +25 -6
- data/lib/jekyll-feed/feed.xml +23 -5
- data/lib/jekyll-feed/generator.rb +8 -0
- data/lib/jekyll-feed/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da9056c2c44badd5c199ed742ea665ad315fa7c6a1924a5ee659a9167a069ea9
|
|
4
|
+
data.tar.gz: addb0b079cc0de3c0217bd9ce525ce9272f84d02a463ae15d7a3076ee13bc82b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44ccc5f9288c5d4f394ed8674444fbefd504ba5eb9e64c821cdcc501aa1b12c2f4f2195ae1d60820954d826f81e2485676e0c855fbde206854170134decbf95d
|
|
7
|
+
data.tar.gz: 26d328fc69fb541a438b81177d2739a168483731dea9923446a0226e82ff5df8f7fe331647c27541a5285613341b9f006d1f92daf2d0e370cc2cb8cf63fdc125
|
data/History.markdown
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
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
|
+
|
|
21
|
+
## 0.17.0 / 2022-10-14
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
* Update CI status badge (#363)
|
|
26
|
+
|
|
27
|
+
### Development Fixes
|
|
28
|
+
|
|
29
|
+
* Add Ruby 3.1 to the CI matrix (#365)
|
|
30
|
+
|
|
31
|
+
### Minor Enhancements
|
|
32
|
+
|
|
33
|
+
* Allow disabling of jekyll-feed while in development (#370)
|
|
34
|
+
|
|
1
35
|
## 0.16.0 / 2022-01-03
|
|
2
36
|
|
|
3
37
|
### Minor Enhancements
|
|
@@ -125,8 +159,6 @@
|
|
|
125
159
|
|
|
126
160
|
* fix <entry> template for posts with post.lang defined (#168)
|
|
127
161
|
|
|
128
|
-
## 0.9.3 / 2017-03-28
|
|
129
|
-
|
|
130
162
|
## 0.9.1 / 2017-02-17
|
|
131
163
|
|
|
132
164
|
### Minor Enhancements
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts
|
|
4
4
|
|
|
5
|
-
[](https://github.com/jekyll/jekyll-feed/actions/workflows/ruby.yml) [](https://badge.fury.io/rb/jekyll-feed)
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -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
|
|
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
|
|
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`
|
|
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
|
|
208
|
-
Settings in post 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
|
|
|
@@ -246,6 +255,16 @@ feed:
|
|
|
246
255
|
|
|
247
256
|
Note that if you include a tag that is excluded a feed will not be generated for it.
|
|
248
257
|
|
|
258
|
+
## Skip development
|
|
259
|
+
|
|
260
|
+
Use `disable_in_development: true` if you want to turn off feed generation when `jekyll.environment == "development"`,
|
|
261
|
+
but don't want to remove the plugin (so you don't accidentally commit the removal). Default value is `false`.
|
|
262
|
+
|
|
263
|
+
```yml
|
|
264
|
+
feed:
|
|
265
|
+
disable_in_development: true
|
|
266
|
+
```
|
|
267
|
+
|
|
249
268
|
## Contributing
|
|
250
269
|
|
|
251
270
|
1. Fork it (https://github.com/jekyll/jekyll-feed/fork)
|
data/lib/jekyll-feed/feed.xml
CHANGED
|
@@ -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 %}
|
|
@@ -8,6 +8,10 @@ module JekyllFeed
|
|
|
8
8
|
# Main plugin action, called by Jekyll-core
|
|
9
9
|
def generate(site)
|
|
10
10
|
@site = site
|
|
11
|
+
if disabled_in_development?
|
|
12
|
+
Jekyll.logger.info "Jekyll Feed:", "Skipping feed generation in development"
|
|
13
|
+
return
|
|
14
|
+
end
|
|
11
15
|
collections.each do |name, meta|
|
|
12
16
|
Jekyll.logger.info "Jekyll Feed:", "Generating feed for #{name}"
|
|
13
17
|
(meta["categories"] + [nil]).each do |category|
|
|
@@ -137,5 +141,9 @@ module JekyllFeed
|
|
|
137
141
|
config["path"] ||= hash["posts"]["path"]
|
|
138
142
|
hash
|
|
139
143
|
end
|
|
144
|
+
|
|
145
|
+
def disabled_in_development?
|
|
146
|
+
config && config["disable_in_development"] && Jekyll.env == "development"
|
|
147
|
+
end
|
|
140
148
|
end
|
|
141
149
|
end
|
data/lib/jekyll-feed/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Balter
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
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: '
|
|
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: '
|
|
74
|
+
version: '13.0'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
76
|
name: rspec
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -120,7 +120,7 @@ dependencies:
|
|
|
120
120
|
- - "<"
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
122
|
version: '2.0'
|
|
123
|
-
description:
|
|
123
|
+
description:
|
|
124
124
|
email:
|
|
125
125
|
- ben.balter@github.com
|
|
126
126
|
executables: []
|
|
@@ -143,7 +143,7 @@ homepage: https://github.com/jekyll/jekyll-feed
|
|
|
143
143
|
licenses:
|
|
144
144
|
- MIT
|
|
145
145
|
metadata: {}
|
|
146
|
-
post_install_message:
|
|
146
|
+
post_install_message:
|
|
147
147
|
rdoc_options: []
|
|
148
148
|
require_paths:
|
|
149
149
|
- lib
|
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
159
|
version: '0'
|
|
160
160
|
requirements: []
|
|
161
161
|
rubygems_version: 3.1.6
|
|
162
|
-
signing_key:
|
|
162
|
+
signing_key:
|
|
163
163
|
specification_version: 4
|
|
164
164
|
summary: A Jekyll plugin to generate an Atom feed of your Jekyll posts
|
|
165
165
|
test_files: []
|