[site/build,#64][s]: remove rewrites effort because not working and breaking existing markdown pages (404).

Unfortunately no way to use nextjs rewrites/redirects for what we want: https://nextjs.org/docs/api-reference/next.config.js/redirects or https://nextjs.org/docs/api-reference/next.config.js/rewrites

Why? We want xyz.md => xyz. Unfortunately nextjs regex matching is for the whole path ie. :page(some-regex) => /abc has the some-regex match all of path not the extension. Furthermore there is no way to redirect to a part fragment.
This commit is contained in:
Rufus Pollock 2022-03-14 17:08:21 +01:00
parent cf15ef6eb8
commit c766efb85e
1 changed files with 2 additions and 11 deletions

View File

@ -22,17 +22,8 @@ const config = {
webpack: (config, { buildId, dev }) => {
config.resolve.symlinks = false
return config
}
}
const rewrites = async () => {
return [
{
source: '/concepts/:page(.md)',
destination: '/concepts/:page',
},
]
},
}
export default withMDX(rewrites(config))
export default withMDX(config)