Closed SEWeiTung closed 2 years ago
permalinks does not render any HTML, that is done by the templating, see https://github.com/nodejs/nodejs.org/blob/main/layouts/partials/html-head.hbs#L33. permalinks is not used with the "false" value set in the codebase you referred to.
Nevertheless the correct path would be /en/404
instead of /en/404.md
. That can only be done by running layouts
before permalinks
.
Closing as stale
Describe the bug When set "permalinks" to false in an md file, there's something wrong in its "link rel".
To Reproduce
npm i
with the latest version of nodejs (Refs: https://github.com/nodejs/nodejs.org).Expected behaviour
Additional context
PS:Maybe we should decide to let users set whether the specific pages can be SEO or not (default is 'true', but for some very special cases such as an error page, SEO doesn't need, so the link shouldn't be added in the generated page ).
I suspect the problem is because when "permalinks = false" , the original route WON'T BE REPLACED but to keep what it was? See: https://github.com/metalsmith/permalinks/blob/5faed4cf22a802bc9de667d0e43a68438e2b0fe2/lib/index.js#L312