File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ module.exports = (eleventyConfig) => {
20
20
eleventyConfig . addFilter ( "iso8601" , rss . dateToRfc3339 )
21
21
eleventyConfig . addFilter ( "date_to_rfc3339" , rss . dateToRfc3339 )
22
22
eleventyConfig . addFilter ( "date_to_rfc822" , rss . dateToRfc822 )
23
+ eleventyConfig . addFilter ( "html_to_absolute_urls" , rss . convertHtmlToAbsoluteUrls )
23
24
24
25
eleventyConfig . setLibrary (
25
26
"md" ,
Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ eleventyExcludeFromCollections: true
6
6
<rss version =" 2.0" xmlns:dc =" http://purl.org/dc/elements/1.1/" xml:base =" https://webcomponents.guide/" xmlns:atom =" http://www.w3.org/2005/Atom" >
7
7
<channel >
8
8
<title >Web Components Guide</title >
9
- <link >https://webcomponents.guide/ </link >
10
- <atom : link href =" {{ permalink | absoluteUrl(metadata .url) }}" rel =" self" type =" application/rss+xml" />
9
+ <link >{{ baseurl }} </link >
10
+ <atom:link href =" {{ baseurl }}/{{ page .url }}" rel =" self" type =" application/rss+xml" />
11
11
<language >en</language >
12
12
{%- for post in collections .blog | reverse %}
13
- {%- set absolutePostUrl = post.url | absoluteUrl(metadata.url) %}
13
+ {%- capture absolutePostUrl %}{{ baseurl }}{{ post .url }}{% endcapture %}
14
14
<item >
15
15
<title >{{ post .data .title }}</title >
16
16
<link >{{ absolutePostUrl }}</link >
17
- <description >{{ post.templateContent | htmlToAbsoluteUrls( absolutePostUrl) }}</description >
18
- <pubDate >{{ post.date | dateToRfc822 }}</pubDate >
17
+ <description >{{ post .templateContent | html_to_absolute_urls: absolutePostUrl }}</description >
18
+ <pubDate >{{ post .date | date_to_rfc822 }}</pubDate >
19
19
{%- for author in post .authors %}
20
20
<dc:creator >{{ author }}</dc:creator >
21
21
{%- endfor %}
22
22
<guid >{{ absolutePostUrl }}</guid >
23
23
</item >
24
24
{%- endfor %}
25
25
</channel >
26
- </rss >
26
+ </rss >
You can’t perform that action at this time.
0 commit comments