Skip to content

Commit 852e77b

Browse files
author
Farzad Hayatbakhsh
committed
DOC-2608: Fix Atom link
1 parent c29fe34 commit 852e77b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/rssfeed.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports.register = function ({ config }) {
3030
// Construct site links
3131
const siteLink = playbook.site.url;
3232
const siteLinkWithVersion = `${siteLink}/${pageComponentName}/${pageComponentVersion}`;
33+
const filePath = `${pageComponentName}/${pageComponentVersion}/${config.outputFile}`;
3334

3435
// Load page content with cheerio
3536
const $ = cheerio.load(page.contents.toString());
@@ -96,13 +97,12 @@ module.exports.register = function ({ config }) {
9697
<description>${pageDescription}</description>
9798
<language>en</language>
9899
<copyright>Creative Commons Legal Code - Attribution-NonCommercial-ShareAlike 3.0 Unported</copyright>
99-
<atom:link href="${siteLink}/rss.xml" rel="self" type="application/rss+xml" />
100+
<atom:link href="${siteLink}/${filePath}" rel="self" type="application/rss+xml" />
100101
${rssItems}
101102
</channel>
102103
</rss>`;
103104

104105
// Add RSS feed to site catalog
105-
const filePath = `${pageComponentName}/${pageComponentVersion}/${config.outputFile}`;
106106
siteCatalog.addFile({
107107
contents: Buffer.from(rss),
108108
out: { path: filePath },

0 commit comments

Comments
 (0)