bridgetown-feed 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -6
- data/CHANGELOG.md +5 -1
- data/README.md +10 -10
- data/bridgetown-feed.gemspec +1 -1
- data/lib/bridgetown-feed/generator.rb +8 -7
- data/lib/bridgetown-feed/meta-tag.rb +4 -4
- data/lib/bridgetown-feed/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 559978b2df337172dca28f682dcc91a163e535ff8f23750d04378bf940b47d83
|
4
|
+
data.tar.gz: 2054eeeccc4d78f411054addf59c167027899c6835dddf6c883fb85c5dad3fbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aef57044ab2fa99b6691b5ad092784a8aa1173dda8e8aaa674e6443910e670287871aa04a9aa0ebd7475eddc796e3f82ded9ea870ef00d79135993471b4a733
|
7
|
+
data.tar.gz: 7b49566d00c3f76f869270ebe74bdff3adad4b2d3428462da092bf04596516b956938ca43f236fcd65d335ab2e417a44d6a749398f0fe886eb4622ea330eff24
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require: rubocop-
|
1
|
+
require: rubocop-bridgetown
|
2
2
|
|
3
3
|
inherit_gem:
|
4
|
-
rubocop-
|
4
|
+
rubocop-bridgetown: .rubocop.yml
|
5
5
|
|
6
6
|
AllCops:
|
7
|
-
TargetRubyVersion: 2.
|
7
|
+
TargetRubyVersion: 2.5
|
8
8
|
Include:
|
9
9
|
- lib/**/*.rb
|
10
10
|
|
@@ -22,6 +22,3 @@ AllCops:
|
|
22
22
|
- script/**/*
|
23
23
|
- vendor/**/*
|
24
24
|
|
25
|
-
Naming/MemoizedInstanceVariableName:
|
26
|
-
Exclude:
|
27
|
-
- lib/bridgetown-feed/page-without-a-file.rb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bridgetown Feed plugin
|
2
2
|
|
3
|
-
A Bridgetown plugin to generate an Atom (RSS-like) feed of your Bridgetown posts
|
3
|
+
A Bridgetown plugin to generate an Atom (RSS-like) feed of your Bridgetown posts and other collection documents.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -16,13 +16,17 @@ Or simply add this line to your Gemfile:
|
|
16
16
|
gem 'bridgetown-feed', group: "bridgetown_plugins"
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
The plugin exposes a helper tag to expose the appropriate meta tags to support automated discovery of your feed.
|
20
20
|
|
21
|
-
|
21
|
+
Simply place `{% feed_meta %}` someplace in your template's `<head>` section to output the necessary metadata.
|
22
|
+
|
23
|
+
### Atom is nice and all, but what about JSON Feed?
|
24
|
+
|
25
|
+
[It's on our roadmap.](https://github.com/bridgetownrb/bridgetown-feed/issues/1) 🙂
|
22
26
|
|
23
|
-
|
27
|
+
## Usage
|
24
28
|
|
25
|
-
The plugin
|
29
|
+
The plugin will automatically generate an Atom feed at `/feed.xml`.
|
26
30
|
|
27
31
|
### Optional configuration options
|
28
32
|
|
@@ -120,7 +124,7 @@ There are several ways to convey author-specific information. Author information
|
|
120
124
|
|
121
125
|
### SmartyPants
|
122
126
|
|
123
|
-
The plugin uses [Bridgetown's `smartify` filter](https://bridgetownrb.com/docs/
|
127
|
+
The plugin uses [Bridgetown's `smartify` filter](https://www.bridgetownrb.com/docs/liquid/filters) for processing the site title and post titles. This will translate plain ASCII punctuation into "smart" typographic punctuation. This will not render or strip any Markdown you may be using in a title.
|
124
128
|
|
125
129
|
Bridgetown's `smartify` filter uses [kramdown](https://kramdown.gettalong.org/options.html) as a processor. Accordingly, if you do not want "smart" typographic punctuation, disabling them in kramdown in your `bridgetown.config.yml` will disable them in your feed. For example:
|
126
130
|
|
@@ -134,10 +138,6 @@ Bridgetown's `smartify` filter uses [kramdown](https://kramdown.gettalong.org/op
|
|
134
138
|
|
135
139
|
Want to style what your feed looks like in the browser? Simply add an XSLT at `/feed.xslt.xml` and Bridgetown Feed will link to the stylesheet.
|
136
140
|
|
137
|
-
## Why Atom, and not RSS?
|
138
|
-
|
139
|
-
Great question. In short, Atom is a better format. Think of it like RSS 3.0. For more information, see [this discussion on why we chose Atom over RSS 2.0](https://github.com/bridgetown/bridgetown-rss-feed/issues/2).
|
140
|
-
|
141
141
|
## Categories
|
142
142
|
|
143
143
|
Bridgetown Feed can generate feeds for each category. Simply define which categories you'd like feeds for in your config:
|
data/bridgetown-feed.gemspec
CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "nokogiri", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake", "~> 12.0"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
-
spec.add_development_dependency "rubocop-
|
26
|
+
spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
|
27
27
|
spec.add_development_dependency "typhoeus", ">= 0.7", "< 2.0"
|
28
28
|
end
|
@@ -10,10 +10,10 @@ module BridgetownFeed
|
|
10
10
|
collections.each do |name, meta|
|
11
11
|
Bridgetown.logger.info "Bridgetown Feed:", "Generating feed for #{name}"
|
12
12
|
(meta["categories"] + [nil]).each do |category|
|
13
|
-
path = feed_path(:
|
13
|
+
path = feed_path(collection: name, category: category)
|
14
14
|
next if file_exists?(path)
|
15
15
|
|
16
|
-
@site.pages << make_page(path, :
|
16
|
+
@site.pages << make_page(path, collection: name, category: category)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -88,11 +88,12 @@ module BridgetownFeed
|
|
88
88
|
PageWithoutAFile.new(@site, __dir__, "", file_path).tap do |file|
|
89
89
|
file.content = feed_template
|
90
90
|
file.data.merge!(
|
91
|
-
"layout"
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"
|
95
|
-
"
|
91
|
+
"layout" => "none",
|
92
|
+
"template_engine" => "liquid",
|
93
|
+
"sitemap" => false,
|
94
|
+
"xsl" => file_exists?("feed.xslt.xml"),
|
95
|
+
"collection" => collection,
|
96
|
+
"category" => category
|
96
97
|
)
|
97
98
|
file.output
|
98
99
|
end
|
@@ -23,10 +23,10 @@ module BridgetownFeed
|
|
23
23
|
|
24
24
|
def attributes
|
25
25
|
{
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
26
|
+
type: "application/atom+xml",
|
27
|
+
rel: "alternate",
|
28
|
+
href: absolute_url(path),
|
29
|
+
title: title,
|
30
30
|
}.keep_if { |_, v| v }
|
31
31
|
end
|
32
32
|
|
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: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -87,19 +87,19 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '3.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name: rubocop-
|
90
|
+
name: rubocop-bridgetown
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '0.
|
95
|
+
version: '0.2'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0.
|
102
|
+
version: '0.2'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: typhoeus
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
|
-
rubygems_version: 3.
|
163
|
+
rubygems_version: 3.1.4
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: A Bridgetown plugin to generate an Atom feed of your Bridgetown posts
|