fix(v2): respect base url in RSS feeds (#4962)

This commit is contained in:
Alexey Pyltsyn 2021-06-15 16:33:41 +03:00 committed by GitHub
parent 57cf20933e
commit 208c089835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View file

@ -72,8 +72,8 @@ export async function generateBlogFeed(
}
const {feedOptions, routeBasePath} = options;
const {url: siteUrl, title, favicon} = siteConfig;
const blogBaseUrl = normalizeUrl([siteUrl, routeBasePath]);
const {url: siteUrl, baseUrl, title, favicon} = siteConfig;
const blogBaseUrl = normalizeUrl([siteUrl, baseUrl, routeBasePath]);
const updated =
(blogPosts[0] && blogPosts[0].metadata.date) ||
@ -86,7 +86,7 @@ export async function generateBlogFeed(
language: feedOptions.language,
link: blogBaseUrl,
description: feedOptions.description || `${siteConfig.title} Blog`,
favicon: normalizeUrl([siteUrl, favicon]),
favicon: normalizeUrl([siteUrl, baseUrl, favicon]),
copyright: feedOptions.copyright,
});