[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:
parent
cf15ef6eb8
commit
c766efb85e
|
|
@ -22,17 +22,8 @@ const config = {
|
||||||
webpack: (config, { buildId, dev }) => {
|
webpack: (config, { buildId, dev }) => {
|
||||||
config.resolve.symlinks = false
|
config.resolve.symlinks = false
|
||||||
return config
|
return config
|
||||||
}
|
},
|
||||||
}
|
|
||||||
|
|
||||||
const rewrites = async () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/concepts/:page(.md)',
|
|
||||||
destination: '/concepts/:page',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default withMDX(rewrites(config))
|
export default withMDX(config)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue