jekyll-feed 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/History.markdown +12 -0
- data/jekyll-feed.gemspec +3 -2
- data/lib/feed.xml +10 -24
- data/lib/jekyll-feed.rb +0 -1
- data/lib/jekyll/feed_meta_tag.rb +4 -4
- data/lib/jekyll/jekyll-feed.rb +1 -2
- metadata +6 -13
- data/lib/jekyll/strip_whitespace.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31ec255441efdec76e24a57228ad15d4df8792aa
|
4
|
+
data.tar.gz: 771f380686b7c6b1f988924ad385abc7e45c044a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f380d4240ccedfe0d193b5ec88cf10feabae1bd948c982340fc078b1fb3653784c3be9188d42923978a67dc13d3be086d306fc324101cdc610dcd36530c664a
|
7
|
+
data.tar.gz: 85c8856882d47079feb5cedbb44975d077c48a6291e6ae181fc924952292fd02b8c1b09d60d3a561cb2b59cbafe281ea5a254b1be71864b2904b7b90cd8fef50
|
data/.rubocop.yml
CHANGED
data/History.markdown
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 0.8.0 / 2016-10-06
|
2
|
+
|
3
|
+
* Use filters to clean up Liquid template (#134)
|
4
|
+
|
5
|
+
### Minor Enhancements
|
6
|
+
|
7
|
+
* Don't set @site.config["time"] on feed generation (#138)
|
8
|
+
|
9
|
+
### pedantry
|
10
|
+
|
11
|
+
* Appease Rubocop (#139)
|
12
|
+
|
1
13
|
## 0.7.2 / 2016-10-06
|
2
14
|
|
3
15
|
* Support `image.path` when `post.image` is an object (#137)
|
data/jekyll-feed.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "jekyll-feed"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.8.0"
|
6
6
|
spec.authors = ["Ben Balter"]
|
7
7
|
spec.email = ["ben.balter@github.com"]
|
8
8
|
spec.summary = "A Jekyll plugin to generate an Atom feed of your Jekyll posts"
|
@@ -14,7 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
15
|
spec.require_paths = ["lib"]
|
16
16
|
|
17
|
-
spec.
|
17
|
+
spec.add_dependency "jekyll", "~> 3.3"
|
18
|
+
|
18
19
|
spec.add_development_dependency "bundler", "~> 1.6"
|
19
20
|
spec.add_development_dependency "rake", "~> 10.0"
|
20
21
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/lib/feed.xml
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
{
|
3
|
-
{% assign url_base = site.url | append: site.baseurl %}
|
4
|
-
{% else %}
|
5
|
-
{% assign url_base = site.github.url %}
|
6
|
-
{% endif %}
|
7
|
-
<?xml-stylesheet type="text/xml" href="{{ url_base }}/feed.xslt.xml"?>
|
2
|
+
<?xml-stylesheet type="text/xml" href="{{ '/feed.xslt.xml' | absolute_url }}"?>
|
8
3
|
<feed xmlns="http://www.w3.org/2005/Atom"{% if site.lang %} xml:lang="{{ site.lang }}"{% endif %}>
|
9
4
|
<generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
|
10
|
-
<link href="{{ page.url |
|
11
|
-
<link href="{{
|
5
|
+
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
|
6
|
+
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
|
12
7
|
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
13
|
-
<id>{{
|
8
|
+
<id>{{ '/' | absolute_url | xml_escape }}/</id>
|
14
9
|
|
15
10
|
{% if site.title %}
|
16
11
|
<title type="html">{{ site.title | smartify | xml_escape }}</title>
|
@@ -24,11 +19,7 @@
|
|
24
19
|
|
25
20
|
{% if site.author %}
|
26
21
|
<author>
|
27
|
-
|
28
|
-
<name>{{ site.author.name | xml_escape }}</name>
|
29
|
-
{% else %}
|
30
|
-
<name>{{ site.author | xml_escape }}</name>
|
31
|
-
{% endif %}
|
22
|
+
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
|
32
23
|
{% if site.author.email %}
|
33
24
|
<email>{{ site.author.email | xml_escape }}</email>
|
34
25
|
{% endif %}
|
@@ -42,16 +33,11 @@
|
|
42
33
|
{% unless post.draft %}
|
43
34
|
<entry{% if post.lang %} xml:lang="{{ post.lang }}"{% endif %}>
|
44
35
|
<title type="html">{{ post.title | smartify | strip_html | replace: '\n', ' ' | strip | xml_escape }}</title>
|
45
|
-
<link href="{{ post.url |
|
36
|
+
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
|
46
37
|
<published>{{ post.date | date_to_xmlschema }}</published>
|
47
|
-
{
|
48
|
-
|
49
|
-
{
|
50
|
-
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
51
|
-
{% endif %}
|
52
|
-
|
53
|
-
<id>{{ post.id | prepend: url_base | xml_escape }}</id>
|
54
|
-
<content type="html" xml:base="{{ post.url | prepend: url_base | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
|
38
|
+
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
|
39
|
+
<id>{{ post.id | absolute_url | xml_escape }}</id>
|
40
|
+
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
|
55
41
|
|
56
42
|
{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
|
57
43
|
{% assign post_author = site.data.authors[post_author] | default: post_author %}
|
@@ -86,7 +72,7 @@
|
|
86
72
|
{% assign post_image = post.image.path | default: post.image %}
|
87
73
|
{% if post_image %}
|
88
74
|
{% unless post_image contains "://" %}
|
89
|
-
{% assign post_image = post_image |
|
75
|
+
{% assign post_image = post_image | absolute_url | xml_escape %}
|
90
76
|
{% endunless %}
|
91
77
|
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image }}" />
|
92
78
|
{% endif %}
|
data/lib/jekyll-feed.rb
CHANGED
data/lib/jekyll/feed_meta_tag.rb
CHANGED
@@ -2,7 +2,7 @@ module Jekyll
|
|
2
2
|
class FeedMetaTag < Liquid::Tag
|
3
3
|
def render(context)
|
4
4
|
@context = context
|
5
|
-
attrs = attributes.map { |k, v| %(#{k}="#{v}") }.join(
|
5
|
+
attrs = attributes.map { |k, v| %(#{k}="#{v}") }.join(" ")
|
6
6
|
"<link #{attrs} />"
|
7
7
|
end
|
8
8
|
|
@@ -14,9 +14,9 @@ module Jekyll
|
|
14
14
|
|
15
15
|
def attributes
|
16
16
|
{
|
17
|
-
:type
|
18
|
-
:rel
|
19
|
-
:href
|
17
|
+
:type => "application/atom+xml",
|
18
|
+
:rel => "alternate",
|
19
|
+
:href => "#{url}/#{path}",
|
20
20
|
:title => title
|
21
21
|
}.keep_if { |_, v| v }
|
22
22
|
end
|
data/lib/jekyll/jekyll-feed.rb
CHANGED
@@ -8,7 +8,6 @@ module Jekyll
|
|
8
8
|
# Main plugin action, called by Jekyll-core
|
9
9
|
def generate(site)
|
10
10
|
@site = site
|
11
|
-
@site.config["time"] = Time.new
|
12
11
|
unless file_exists?(feed_path)
|
13
12
|
@site.pages << content_for_file(feed_path, feed_source_path)
|
14
13
|
end
|
@@ -55,7 +54,7 @@ module Jekyll
|
|
55
54
|
# Generates contents for a file
|
56
55
|
def content_for_file(file_path, file_source_path)
|
57
56
|
file = PageWithoutAFile.new(@site, File.dirname(__FILE__), "", file_path)
|
58
|
-
file.content = File.read(file_source_path).gsub(
|
57
|
+
file.content = File.read(file_source_path).gsub(%r!(?<\!")\s+([<{])!, '\1')
|
59
58
|
file.data["layout"] = nil
|
60
59
|
file.data["sitemap"] = false
|
61
60
|
file.output
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-feed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
@@ -14,22 +14,16 @@ dependencies:
|
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.0
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
23
|
-
type: :
|
19
|
+
version: '3.3'
|
20
|
+
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 3.1.0
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
26
|
+
version: '3.3'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: bundler
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +131,6 @@ files:
|
|
137
131
|
- lib/jekyll/feed_meta_tag.rb
|
138
132
|
- lib/jekyll/jekyll-feed.rb
|
139
133
|
- lib/jekyll/page_without_a_file.rb
|
140
|
-
- lib/jekyll/strip_whitespace.rb
|
141
134
|
- script/bootstrap
|
142
135
|
- script/cibuild
|
143
136
|
- script/release
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# The `strip` filter was added to Liquid in version 3
|
2
|
-
# Jekyll did not require Liquid 3 until Jekyll 3.0.0
|
3
|
-
# This shim is needed for compatibility with Jekyll 2.x
|
4
|
-
|
5
|
-
module Jekyll
|
6
|
-
module StripWhitespace
|
7
|
-
def strip(input)
|
8
|
-
input.to_s.strip
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
unless Liquid::StandardFilters.method_defined?(:strip)
|
14
|
-
Liquid::Template.register_filter(Jekyll::StripWhitespace)
|
15
|
-
end
|