bridgetown-feed 3.1.2 → 4.0.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/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/README.md +15 -5
- data/bridgetown-feed.gemspec +2 -2
- data/lib/bridgetown-feed/builder.rb +1 -0
- data/lib/bridgetown-feed/{feed.xml → feed.liquid} +7 -0
- data/lib/bridgetown-feed/generator.rb +7 -7
- data/lib/bridgetown-feed/version.rb +1 -1
- metadata +7 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aef48adad606b4af2f1540e3e151126d893d18158a42b494a78d0133a306aa6
|
4
|
+
data.tar.gz: 879e376744ef6e3817a5b002a556f47e8551339e310c284414b6090f7b8bcedc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bd43cb67df4e920ada7b7ded0454c0db9090147efc97ff87bc82ec29909c30c6cb3f9f4e806fb2506e43a3e05498dd2a36b4eb50e4b3ef5f4dfb277bbffdc2e
|
7
|
+
data.tar.gz: fbfc02b12d72663bbcd2c0df4c12a9f94d9d3010e9cbff55c7c1ba9d6a6cc4bb0d939029e54988ba47fe97f54e772c76945cf1e18148f8bff9332141103d2579
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -34,16 +34,16 @@ The plugin exposes a helper tag to expose the appropriate meta tags to support a
|
|
34
34
|
|
35
35
|
Simply place `feed_meta` someplace in your layout's `<head>` section to output the necessary metadata.
|
36
36
|
|
37
|
-
```liquid
|
38
|
-
<!-- layout.liquid -->
|
39
|
-
{% feed_meta %}
|
40
|
-
```
|
41
|
-
|
42
37
|
```erb
|
43
38
|
<!-- layout.erb -->
|
44
39
|
<%= feed_meta %>
|
45
40
|
```
|
46
41
|
|
42
|
+
```liquid
|
43
|
+
<!-- layout.liquid -->
|
44
|
+
{% feed_meta %}
|
45
|
+
```
|
46
|
+
|
47
47
|
The plugin will automatically generate an Atom feed at `/feed.xml`.
|
48
48
|
|
49
49
|
### Optional configuration options
|
@@ -234,6 +234,16 @@ feed:
|
|
234
234
|
post_limit: 25
|
235
235
|
```
|
236
236
|
|
237
|
+
## Icons
|
238
|
+
|
239
|
+
You can optionally specify feed's icon and logo relative paths:
|
240
|
+
|
241
|
+
```yml
|
242
|
+
feed:
|
243
|
+
icon: "/images/icon.png"
|
244
|
+
logo: "/images/logo.png"
|
245
|
+
```
|
246
|
+
|
237
247
|
## Testing
|
238
248
|
|
239
249
|
* Run `bundle exec rspec` to run the test suite
|
data/bridgetown-feed.gemspec
CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.test_files = spec.files.grep(%r!^spec/!)
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
|
18
|
-
spec.required_ruby_version = ">=
|
18
|
+
spec.required_ruby_version = ">= 3.1.0"
|
19
19
|
|
20
|
-
spec.add_dependency "bridgetown", ">= 1.2.0
|
20
|
+
spec.add_dependency "bridgetown", ">= 1.2.0"
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler"
|
23
23
|
spec.add_development_dependency "rss"
|
@@ -9,6 +9,13 @@
|
|
9
9
|
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
10
10
|
<id>{{ page.url | absolute_url | xml_escape }}</id>
|
11
11
|
|
12
|
+
{% if site.feed.icon and site.feed.icon != empty %}
|
13
|
+
<icon>{{ site.feed.icon | absolute_url }}</icon>
|
14
|
+
{% endif %}
|
15
|
+
{% if site.feed.logo and site.feed.logo != empty %}
|
16
|
+
<logo>{{ site.feed.logo | absolute_url }}</logo>
|
17
|
+
{% endif %}
|
18
|
+
|
12
19
|
{% assign title = site.metadata.title | default: site.metadata.name %}
|
13
20
|
{% if page.collection != "posts" %}
|
14
21
|
{% assign collection = page.collection | capitalize %}
|
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
module BridgetownFeed
|
4
4
|
class Generator < Bridgetown::Generator
|
5
|
+
# Matches all whitespace that follows
|
6
|
+
# 1. A '>', which closes an XML tag or
|
7
|
+
# 2. A '}', which closes a Liquid tag
|
8
|
+
# We will strip all of this whitespace to minify the template
|
9
|
+
MINIFY_REGEX = %r!(?<=>|})\s+!.freeze
|
10
|
+
|
5
11
|
priority :lowest
|
6
12
|
|
7
13
|
# Main plugin action, called by Bridgetown-core
|
@@ -20,12 +26,6 @@ module BridgetownFeed
|
|
20
26
|
|
21
27
|
private
|
22
28
|
|
23
|
-
# Matches all whitespace that follows
|
24
|
-
# 1. A '>', which closes an XML tag or
|
25
|
-
# 2. A '}', which closes a Liquid tag
|
26
|
-
# We will strip all of this whitespace to minify the template
|
27
|
-
MINIFY_REGEX = %r!(?<=>|})\s+!.freeze
|
28
|
-
|
29
29
|
# Returns the plugin's config or an empty hash if not set
|
30
30
|
def config
|
31
31
|
@config ||= @site.config["feed"] || {}
|
@@ -70,7 +70,7 @@ module BridgetownFeed
|
|
70
70
|
|
71
71
|
# Path to feed.xml template file
|
72
72
|
def feed_source_path
|
73
|
-
@feed_source_path ||= File.expand_path "feed.
|
73
|
+
@feed_source_path ||= File.expand_path "feed.liquid", __dir__
|
74
74
|
end
|
75
75
|
|
76
76
|
def feed_template
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-feed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.2.0
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '2.0'
|
19
|
+
version: 1.2.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.2.0
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '2.0'
|
26
|
+
version: 1.2.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: bundler
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +145,7 @@ files:
|
|
151
145
|
- bridgetown-feed.gemspec
|
152
146
|
- lib/bridgetown-feed.rb
|
153
147
|
- lib/bridgetown-feed/builder.rb
|
154
|
-
- lib/bridgetown-feed/feed.
|
148
|
+
- lib/bridgetown-feed/feed.liquid
|
155
149
|
- lib/bridgetown-feed/generator.rb
|
156
150
|
- lib/bridgetown-feed/version.rb
|
157
151
|
homepage: https://github.com/bridgetownrb/bridgetown-feed
|
@@ -166,14 +160,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
160
|
requirements:
|
167
161
|
- - ">="
|
168
162
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
163
|
+
version: 3.1.0
|
170
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
165
|
requirements:
|
172
166
|
- - ">="
|
173
167
|
- !ruby/object:Gem::Version
|
174
168
|
version: '0'
|
175
169
|
requirements: []
|
176
|
-
rubygems_version: 3.5.
|
170
|
+
rubygems_version: 3.5.16
|
177
171
|
signing_key:
|
178
172
|
specification_version: 4
|
179
173
|
summary: A Bridgetown plugin to generate an Atom feed of your Bridgetown posts
|