diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index 3c29eb18ba..4228855219 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -281,7 +281,7 @@ module.exports = { throw new Error(`Could not build HTML partials from Markdown. A page (${pageRelSourcePath}) contains an invalid relative Markdown link (${hrefString.replace(/^href=/, '')}). To resolve, make sure all relative links on this page that link to a specific section include the Markdown page extension (.md) and try running this script again.`); } let referencedPageNewUrl = 'https://fleetdm.com/' + ( - (path.relative(topLvlRepoPath, referencedPageSourcePath).replace(/(^|\/)([^/]+)\.[^/]*$/, '$1$2').split(/\//).map((fileOrFolderName) => fileOrFolderName.toLowerCase().replace(/\s+/g, '-')).join('/')) + (path.relative(topLvlRepoPath, referencedPageSourcePath).replace(/(^|\/)([^/]+)\.[^/]*$/, '$1$2').split(/\//).map((fileOrFolderName) => fileOrFolderName.toLowerCase().replace(/%20|\s+/g, '-')).join('/')) .split(/\//).map((fileOrFolderName) => encodeURIComponent(fileOrFolderName.replace(/^[0-9]+[\-]+/,''))).join('/') ).replace(RX_README_FILENAME, ''); if(possibleReferencedUrlHash) {