mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 19:27:48 +02:00
Fix links in blog Atom feed (#421)
The root URL was missing the baseURL portion. This is fine when a site is hosted on a custom URL such as docusaurus.io, because the generated URL will be valid (docusaurus.io/blog), but it breaks when the site is hosted on GitHub Pages (the React Native feed was using facebook.github.io/blog as the rootURL). * Fix link to header image
This commit is contained in:
parent
c6a9848a17
commit
c99cdefd3a
1 changed files with 4 additions and 3 deletions
|
@ -16,8 +16,9 @@ const CWD = process.cwd();
|
||||||
const siteConfig = require(CWD + '/siteConfig.js');
|
const siteConfig = require(CWD + '/siteConfig.js');
|
||||||
|
|
||||||
const blogFolder = path.resolve('../blog/');
|
const blogFolder = path.resolve('../blog/');
|
||||||
const blogRootURL = siteConfig.url + '/blog';
|
const blogRootURL = siteConfig.url + siteConfig.baseUrl + 'blog';
|
||||||
const jestImage = siteConfig.url + '/' + siteConfig.headerIcon;
|
const siteImageURL =
|
||||||
|
siteConfig.url + siteConfig.baseUrl + siteConfig.headerIcon;
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ module.exports = function(type) {
|
||||||
' news and events.',
|
' news and events.',
|
||||||
id: blogRootURL,
|
id: blogRootURL,
|
||||||
link: blogRootURL,
|
link: blogRootURL,
|
||||||
image: jestImage,
|
image: siteImageURL,
|
||||||
copyright: siteConfig.copyright,
|
copyright: siteConfig.copyright,
|
||||||
updated: new Date(MetadataBlog[0].date),
|
updated: new Date(MetadataBlog[0].date),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue