bridgetown-feed 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f131469df79b55a8819c8786c67a43dee989af1f25a17eac87be38d4b716855
4
- data.tar.gz: e4947533d8fcd65a9039ea3887a5feda1d4eaece77ca3ea9b48cd9027ec098f1
3
+ metadata.gz: 8d1ee5e7054b88bba714fecc3f8586682c79310b4b868e375207a8792fc288ab
4
+ data.tar.gz: aca5c23b8dc1ef3b1a16fbd806f2bf34aed21b38553e6b8544507b3675410c94
5
5
  SHA512:
6
- metadata.gz: 5cef92281ae526b0bc5e7390d267aafc7f7253afaf672a5168f743bfe58856e49d49075141f50a1841d69bdbec61d6bfc764b3baf50d7988da84c5761885d00a
7
- data.tar.gz: 51484a2e4497f8279b6bfe7e2e1973befbb38e682de5451da947c5e253df90463f1e0e662b4c98df5626e66ebeaebe8532a8b4e34b0506ded2d0b7a377cc02ee
6
+ metadata.gz: fe735a12d2e9669646ff7e3e91122ed113b90d14f4302e0dfae5a4a0a172e61dc16628dc9a1d2ae6a46aca28362a8df241934c5494eb4884cccf2dba70a91b75
7
+ data.tar.gz: 5dc692945109e3eb707b39a42f39509ab5a0299d9e266f5b6478510944645c1bc07a02ddff28f1115a51b1534bbfdbba4ac262e2cbef6bd4eb25c17d7bccec1c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ...
6
+
7
+ ## 2.1.0 / 2021-10-26
8
+
9
+ * Update test suite and ensure generated pages have the right permalink
10
+ * Switch from `site.pages` to `site.generated_pages` due to Bridgetown 1.0 API change
11
+
3
12
  ## 2.0.1 / 2021-06-04
4
13
 
5
14
  * Fix bug where resources' relative URLs weren't included properly
@@ -17,11 +17,11 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.required_ruby_version = ">= 2.5.0"
19
19
 
20
- spec.add_dependency "bridgetown", ">= 0.20", "< 2.0"
20
+ spec.add_dependency "bridgetown", ">= 1.0.0.alpha5", "< 2.0"
21
21
 
22
22
  spec.add_development_dependency "bundler"
23
23
  spec.add_development_dependency "nokogiri", "~> 1.6"
24
- spec.add_development_dependency "rake", "~> 12.0"
24
+ spec.add_development_dependency "rake", "~> 13.0"
25
25
  spec.add_development_dependency "rspec", "~> 3.0"
26
26
  spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
27
27
  spec.add_development_dependency "typhoeus", ">= 0.7", "< 2.0"
@@ -40,24 +40,20 @@
40
40
  {% endif %}
41
41
 
42
42
  {% assign feed_collection = collections[page.collection] %}
43
- {% if site.uses_resource %}
44
- {% find posts where feed_collection.resources, draft != true %}
45
- {% else %}
46
- {% assign posts = feed_collection.docs | where_exp: "post", "post.draft != true" | sort: "date" | reverse %}
47
- {% endif %}
43
+ {% find posts where feed_collection.resources, draft != true %}
48
44
  {% if page.category %}
49
45
  {% assign posts = posts | where: "category",page.category %}
50
46
  {% endif %}
51
47
  {% for post in posts limit: 10 %}
52
48
  <entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
53
49
  <title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
54
- <link href="{{ post.relative_url | default: post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
50
+ <link href="{{ post.absolute_url | default: post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
55
51
  <published>{{ post.date | date_to_xmlschema }}</published>
56
52
  <updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
57
53
  <id>{{ post.id | absolute_url | xml_escape }}</id>
58
54
  {% assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only %}
59
55
  {% unless excerpt_only %}
60
- <content type="html" xml:base="{{ post.relative_url | default: post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
56
+ <content type="html" xml:base="{{ post.absolute_url | default: post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
61
57
  {% endunless %}
62
58
 
63
59
  {% assign post_author = post.author | default: post.authors[0] | default: site.metadata.author %}
@@ -13,7 +13,7 @@ module BridgetownFeed
13
13
  path = feed_path(collection: name, category: category)
14
14
  next if file_exists?(path)
15
15
 
16
- @site.pages << make_page(path, collection: name, category: category)
16
+ @site.generated_pages << make_page(path, collection: name, category: category)
17
17
  end
18
18
  end
19
19
  end
@@ -89,6 +89,7 @@ module BridgetownFeed
89
89
  file.content = feed_template
90
90
  file.data.merge!(
91
91
  "layout" => "none",
92
+ "permalink" => file_path,
92
93
  "template_engine" => "liquid",
93
94
  "sitemap" => false,
94
95
  "xsl" => file_exists?("feed.xslt.xml"),
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bridgetown
4
4
  module Feed
5
- VERSION = "2.0.1"
5
+ VERSION = "2.1.0"
6
6
  end
7
7
  end
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: 2.0.1
4
+ version: 2.1.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: 2021-06-04 00:00:00.000000000 Z
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.20'
19
+ version: 1.0.0.alpha5
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.20'
29
+ version: 1.0.0.alpha5
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '12.0'
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: '12.0'
74
+ version: '13.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rspec
77
77
  requirement: !ruby/object:Gem::Requirement