Skip to content

Commit 2dbaa09

Browse files
authored
Merge pull request #7177 from layer5io/copilot/fix-truncated-page-data-error
[gatsby-node] Fix double .html suffix in CI builds
2 parents 1b47b97 + d14c568 commit 2dbaa09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (process.env.CI === "true") {
1919
// All process.env.CI conditionals in this file are in place for GitHub Pages, if webhost changes in the future, code may need to be modified or removed.
2020
//Replacing '/' would result in empty string which is invalid
2121
const replacePath = (url) =>
22-
url === "/" || url.includes("/404") ? url : `${url}.html`;
22+
url === "/" || url.includes("/404") || url.endsWith(".html") ? url : `${url}.html`;
2323

2424
exports.onCreatePage = ({ page, actions }) => {
2525
const { createPage, deletePage, createRedirect } = actions;

0 commit comments

Comments
 (0)