Skip to content

Commit da0cde8

Browse files
Merge github.com:RichardFevrier/jekyll-feed; github.com:jekyll/jekyll-feed
2 parents 7d210c5 + 7d9c3a4 commit da0cde8

File tree

17 files changed

+266
-110
lines changed

17 files changed

+266
-110
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release Gem
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths: ["lib/**/version.rb"]
7+
8+
jobs:
9+
release:
10+
if: "github.repository_owner == 'jekyll'"
11+
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
12+
runs-on: "ubuntu-latest"
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
ruby_version: ["2.7"]
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v2
20+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: ${{ matrix.ruby_version }}
24+
bundler-cache: true
25+
- name: Build and Publish Gem
26+
uses: ashmaroli/release-gem@dist
27+
with:
28+
gemspec_name: "jekyll-feed"
29+
env:
30+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}

.github/workflows/ruby.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ on:
88

99
jobs:
1010
test:
11-
if: "!contains(github.event.commits[0].message, '[ci skip]')"
1211
name: 'Ruby ${{ matrix.ruby-version }}'
1312
runs-on: ubuntu-latest
1413
strategy:
1514
matrix:
16-
ruby-version: ['2.6', '2.7', '3.0']
15+
ruby-version: ['2.6', '2.7', '3.0', '3.1']
1716

1817
steps:
1918
- uses: actions/checkout@v2
@@ -22,12 +21,5 @@ jobs:
2221
with:
2322
ruby-version: ${{ matrix.ruby-version }}
2423
bundler-cache: true
25-
- name: Cache dependencies
26-
uses: actions/[email protected]
27-
with:
28-
path: vendor/bundle
29-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-gems-
3224
- name: Run tests
3325
run: bash script/cibuild

.rubocop.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
1+
inherit_from: .rubocop_todo.yml
2+
13
require: rubocop-jekyll
24

35
inherit_gem:
46
rubocop-jekyll: .rubocop.yml
57

68
AllCops:
7-
TargetRubyVersion: 2.4
8-
Include:
9-
- lib/**/*.rb
10-
9+
TargetRubyVersion: 2.5
10+
SuggestExtensions: false
1111
Exclude:
12-
- .gitignore
13-
- .rspec
14-
- .rubocop.yml
15-
- .travis.yml
12+
- vendor/**/*
1613

17-
- Gemfile.lock
18-
- History.markdown
19-
- LICENSE.txt
20-
- README.md
14+
Layout/LineEndStringConcatenationIndentation:
15+
Enabled: true
2116

22-
- script/**/*
23-
- vendor/**/*
17+
Lint/EmptyInPattern:
18+
Enabled: false
19+
20+
Metrics/AbcSize:
21+
IgnoredMethods:
22+
- generate # in generator.rb
2423

24+
Naming/InclusiveLanguage:
25+
Enabled: false
2526
Naming/MemoizedInstanceVariableName:
2627
Exclude:
2728
- lib/jekyll-feed/page-without-a-file.rb
29+
30+
Performance/MapCompact:
31+
Enabled: true
32+
Performance/RedundantEqualityComparisonBlock:
33+
Enabled: true
34+
Performance/RedundantSplitRegexpArgument:
35+
Enabled: true
36+
37+
Style/InPatternThen:
38+
Enabled: false
39+
Style/MultilineInPatternThen:
40+
Enabled: false
41+
Style/QuotedSymbols:
42+
Enabled: true

.rubocop_todo.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2021-09-17 11:44:51 UTC using RuboCop version 1.18.4.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Cop supports --auto-correct.
11+
Layout/EmptyLines:
12+
Exclude:
13+
- 'spec/jekyll-feed_spec.rb'
14+
15+
# Offense count: 15
16+
# Cop supports --auto-correct.
17+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
18+
# URISchemes: http, https
19+
Layout/LineLength:
20+
Max: 144
21+
22+
# Offense count: 3
23+
# Configuration parameters: AllowedMethods.
24+
# AllowedMethods: enums
25+
Lint/ConstantDefinitionInBlock:
26+
Exclude:
27+
- 'spec/jekyll-feed_spec.rb'
28+
- 'spec/spec_helper.rb'
29+
30+
# Offense count: 3
31+
# Cop supports --auto-correct.
32+
Performance/RegexpMatch:
33+
Exclude:
34+
- 'spec/jekyll-feed_spec.rb'
35+
36+
# Offense count: 2
37+
# Cop supports --auto-correct.
38+
# Configuration parameters: AutoCorrect.
39+
Performance/StringInclude:
40+
Exclude:
41+
- 'spec/jekyll-feed_spec.rb'
42+
43+
# Offense count: 2
44+
# Cop supports --auto-correct.
45+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
46+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
47+
Style/HashSyntax:
48+
Exclude:
49+
- 'spec/jekyll-feed_spec.rb'
50+
51+
# Offense count: 7
52+
# Cop supports --auto-correct.
53+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
54+
# SupportedStyles: single_quotes, double_quotes
55+
Style/StringLiterals:
56+
Exclude:
57+
- 'spec/jekyll-feed_spec.rb'
58+
59+
# Offense count: 5
60+
# Cop supports --auto-correct.
61+
# Configuration parameters: EnforcedStyleForMultiline.
62+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
63+
Style/TrailingCommaInHashLiteral:
64+
Exclude:
65+
- 'spec/jekyll-feed_spec.rb'

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
source "https://rubygems.org"
44
gemspec
55

6-
gem "rss" if RUBY_VERSION >= "3.0.0"
76
gem "jekyll", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"]
87
gem "kramdown-parser-gfm" if ENV["JEKYLL_VERSION"] == "~> 3.9"
8+
gem "rss" if RUBY_VERSION >= "3.0.0"
99

1010
install_if -> { Gem.win_platform? } do
1111
gem "tzinfo", "~> 1.2"

History.markdown

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,48 @@
11
## HEAD
22

3+
### Development Fixes
4+
5+
* Upgrade to Rake 13 to fix master (#381)
6+
7+
### Documentation
8+
9+
* Fix typos in Readme (#384)
10+
11+
## 0.17.0 / 2022-10-14
12+
13+
### Documentation
14+
15+
* Update CI status badge (#363)
16+
17+
### Development Fixes
18+
19+
* Add Ruby 3.1 to the CI matrix (#365)
20+
21+
### Minor Enhancements
22+
23+
* Allow disabling of jekyll-feed while in development (#370)
24+
25+
## 0.16.0 / 2022-01-03
26+
27+
### Minor Enhancements
28+
29+
* Add support for `page.description` in front matter to become entry `<summary>` (#297)
30+
31+
### Bug Fixes
32+
33+
* Fold private methods into the `:render` method as local variables (#327)
34+
* Check `post.categories` instead of `post.category` (#357)
35+
* Switched xml_escape for `<![CDATA[]]>` for post content (#332)
36+
337
### Development Fixes
438

539
* Add Ruby 3.0 to CI (#337)
40+
* Lock RuboCop to v1.18.x (#348)
41+
* Add workflow to release gem via GH Action (#355)
42+
43+
### Documentation
44+
45+
* Use `.atom` extension in documented examples since we write an Atom feed (#359)
646

747
## 0.15.1 / 2020-10-04
848

@@ -109,8 +149,6 @@
109149

110150
* fix <entry> template for posts with post.lang defined (#168)
111151

112-
## 0.9.3 / 2017-03-28
113-
114152
## 0.9.1 / 2017-02-17
115153

116154
### Minor Enhancements

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts
44

5-
[![Build Status](https://travis-ci.org/jekyll/jekyll-feed.svg)](https://travis-ci.org/jekyll/jekyll-feed) [![Gem Version](https://badge.fury.io/rb/jekyll-feed.svg)](https://badge.fury.io/rb/jekyll-feed)
5+
[![Continuous Integration](https://github.com/jekyll/jekyll-feed/actions/workflows/ruby.yml/badge.svg)](https://github.com/jekyll/jekyll-feed/actions/workflows/ruby.yml) [![Gem Version](https://badge.fury.io/rb/jekyll-feed.svg)](https://badge.fury.io/rb/jekyll-feed)
66

77
## Installation
88

@@ -40,7 +40,7 @@ Do you already have an existing feed someplace other than `/feed.xml`, but are o
4040

4141
```yml
4242
feed:
43-
path: atom.xml
43+
path: /blog/feed.atom
4444
```
4545

4646
To note, you shouldn't have to do this unless you already have a feed you're using, and you can't or wish not to redirect existing subscribers.
@@ -62,13 +62,15 @@ Additionally, the plugin will use the following values, if present in a post's Y
6262

6363
* `author` - The author of the post, e.g., "Dr. Jekyll". If none is given, feed readers will look to the feed author as defined in `_config.yml`. Like the feed author, this can also be an object or a reference to an author in `_data/authors.yml` (see below).
6464

65+
* `description` - A short description of the post.
66+
6567
### Author information
6668

6769
*TL;DR: In most cases, put `author: [your name]` in the document's front matter, for sites with multiple authors. If you need something more complicated, read on.*
6870

6971
There are several ways to convey author-specific information. Author information is found in the following order of priority:
7072

71-
1. An `author` object, in the documents's front matter, e.g.:
73+
1. An `author` object, in the document's front matter, e.g.:
7274

7375
```yml
7476
author:
@@ -176,16 +178,16 @@ By default, collection feeds will be outputted to `/feed/<COLLECTION>.xml`. If y
176178
feed:
177179
collections:
178180
changes:
179-
path: "/changes.xml"
181+
path: "/changes.atom"
180182
```
181183

182-
Finally, collections can also have category feeds which are outputted as `/feed/<COLLECTION>/<CATEGORY>.xml`. Specify categories like so:
184+
Finally, collections can also have category feeds that are outputted as `/feed/<COLLECTION>/<CATEGORY>.xml`. Specify categories like so:
183185

184186
```yml
185187
feed:
186188
collections:
187189
changes:
188-
path: "/changes.xml"
190+
path: "/changes.atom"
189191
categories:
190192
- news
191193
- updates
@@ -195,15 +197,15 @@ feed:
195197

196198
Optional flag `excerpt_only` allows you to exclude post content from the Atom feed. Default value is `false` for backward compatibility.
197199

198-
When in `config.yml` is `true` than all posts in feed will be without `<content>` tags.
200+
When in `config.yml` is `true` then all posts in feed will be without `<content>` tags.
199201

200202
```yml
201203
feed:
202204
excerpt_only: true
203205
```
204206

205-
The same flag can be used directly in post file. It will be disable `<content>` tag for selected post.
206-
Settings in post file has higher priority than in config file.
207+
The same flag can be used directly in post file. It will disable `<content>` tag for selected post.
208+
Settings in post file have higher priority than in config file.
207209

208210
## Tags
209211

@@ -244,6 +246,16 @@ feed:
244246

245247
Note that if you include a tag that is excluded a feed will not be generated for it.
246248

249+
## Skip development
250+
251+
Use `disable_in_development: true` if you want to turn off feed generation when `jekyll.environment == "development"`,
252+
but don't want to remove the plugin (so you don't accidentally commit the removal). Default value is `false`.
253+
254+
```yml
255+
feed:
256+
disable_in_development: true
257+
```
258+
247259
## Contributing
248260

249261
1. Fork it (https://github.com/jekyll/jekyll-feed/fork)

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ environment:
1111
- RUBY_FOLDER_VER: "26"
1212
JEKYLL_VERSION : ">= 4.0.0.pre.alpha1"
1313
- RUBY_FOLDER_VER: "26"
14-
- RUBY_FOLDER_VER: "24"
1514

1615
install:
1716
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%-x64\bin;%PATH%

jekyll-feed.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Gem::Specification.new do |spec|
1616
spec.test_files = spec.files.grep(%r!^spec/!)
1717
spec.require_paths = ["lib"]
1818

19-
spec.required_ruby_version = ">= 2.4.0"
19+
spec.required_ruby_version = ">= 2.5.0"
2020

2121
spec.add_dependency "jekyll", ">= 3.7", "< 5.0"
2222

2323
spec.add_development_dependency "bundler"
2424
spec.add_development_dependency "nokogiri", "~> 1.6"
25-
spec.add_development_dependency "rake", "~> 12.0"
25+
spec.add_development_dependency "rake", "~> 13.0"
2626
spec.add_development_dependency "rspec", "~> 3.0"
27-
spec.add_development_dependency "rubocop-jekyll", "~> 0.5"
27+
spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0"
2828
spec.add_development_dependency "typhoeus", ">= 0.7", "< 2.0"
2929
end

0 commit comments

Comments
 (0)