Skip to content

Commit

Permalink
fix: add code back to attempt to fix rss feed generation
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkmcadoo committed Nov 18, 2022
1 parent 7fce07b commit 89c903d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const autoLinkHeaders = {
};

module.exports = {
trailingSlash: 'always',
flags: {
DEV_SSR: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
Expand Down Expand Up @@ -539,5 +540,4 @@ module.exports = {
},
},
],
trailingSlash: 'always',
};
7 changes: 2 additions & 5 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,17 @@ const createLocalizedRedirect = ({
createRedirect,
}) => {
// Create redirects
const pathWithTrailingSlash = hasTrailingSlash(fromPath)
? fromPath
: path.join(fromPath, '/');

createRedirect({
fromPath: pathWithTrailingSlash,
fromPath,
toPath: appendTrailingSlash(toPath),
isPermanent,
redirectInBrowser,
});

locales.forEach((locale) => {
createRedirect({
fromPath: path.join(`/${locale}`, pathWithTrailingSlash),
fromPath: path.join(`/${locale}`, fromPath),
toPath: appendTrailingSlash(path.join(`/${locale}`, toPath)),
isPermanent,
redirectInBrowser,
Expand Down

0 comments on commit 89c903d

Please sign in to comment.