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:
Héctor Ramos 2018-01-31 20:04:35 -08:00 committed by Joel Marcey
parent c6a9848a17
commit c99cdefd3a

View file

@ -16,8 +16,9 @@ const CWD = process.cwd();
const siteConfig = require(CWD + '/siteConfig.js');
const blogFolder = path.resolve('../blog/');
const blogRootURL = siteConfig.url + '/blog';
const jestImage = siteConfig.url + '/' + siteConfig.headerIcon;
const blogRootURL = siteConfig.url + siteConfig.baseUrl + 'blog';
const siteImageURL =
siteConfig.url + siteConfig.baseUrl + siteConfig.headerIcon;
/****************************************************************************/
@ -46,7 +47,7 @@ module.exports = function(type) {
' news and events.',
id: blogRootURL,
link: blogRootURL,
image: jestImage,
image: siteImageURL,
copyright: siteConfig.copyright,
updated: new Date(MetadataBlog[0].date),
});