File tree Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
...
6
6
7
- ## 3.1.1 / 2024/02-02
7
+ ## 3.1.2 / 2024-03-02
8
+
9
+ * Fix: as readme promises, use ` id ` from a post's front matter if present
10
+
11
+ ## 3.1.1 / 2024-02-02
8
12
9
13
* Remove duplicate variable assignment (@jbennett )
10
14
Original file line number Diff line number Diff line change 46
46
{% endif %}
47
47
{% assign post_limit = site.feed.collections[page.collection].post_limit | default: site.feed.post_limit | default: 10 %}
48
48
{% for post in posts limit: post_limit %}
49
+ {% assign post_id = post.data.id | default: post.id %}
49
50
<entry {% if post.lang %}{{" " }}xml:lang=" {{ post.lang }}" {% endif %}>
50
51
<title type =" html" >{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title >
51
52
<link href =" {{ post.absolute_url | default: post.url | absolute_url }}" rel =" alternate" type =" text/html" title =" {{ post.title | xml_escape }}" />
52
53
<published >{{ post.date | date_to_xmlschema }}</published >
53
54
<updated >{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated >
54
- <id >{{ post.id | absolute_url | xml_escape }}</id >
55
+ <id >{{ post_id | absolute_url | xml_escape }}</id >
55
56
{% assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only %}
56
57
{% unless excerpt_only %}
57
58
<content type =" html" xml : base =" {{ post.absolute_url | default: post.url | absolute_url | xml_escape }}" >{{ post.content | strip | xml_escape }}</content >
Original file line number Diff line number Diff line change 2
2
3
3
module Bridgetown
4
4
module Feed
5
- VERSION = "3.1.1 "
5
+ VERSION = "3.1.2 "
6
6
end
7
7
end
Original file line number Diff line number Diff line change 169
169
expect ( post . summary ) . to be_nil
170
170
end
171
171
172
+ it "has the correct item ids" do
173
+ expect ( feed . items . first . id . content ) . to eql ( "repo://posts.collection/_posts/2016-04-25-author-reference.md" )
174
+ expect ( feed . items . last . id . content ) . to eql ( "https://example.com/foo" )
175
+ end
176
+
172
177
context "with site.lang set" do
173
178
lang = "en_US"
174
179
let ( :overrides ) { { "lang" => lang } }
Original file line number Diff line number Diff line change 1
1
---
2
+ id : https://example.com/foo
2
3
excerpt : " Foo"
3
4
image : " /image.png"
4
5
category : news
You can’t perform that action at this time.
0 commit comments