Open colindresj opened 3 years ago
Thanks for reporting. I can reproduce this with any permalink. I'll look into it a bit.
According to https://github.com/11ty/eleventy/issues/539#issuecomment-494776672, you need to enclose the value in quotes and prefix it with a pipe "|" character. The reason is that pug is trying to compile it as code.
It's still not expected behavior.
I ran into this same issue using WebC. The following source file causes an error on build:
404.webc
---
permalink: 404.html
---
In the WebC case, the fix is either to "double quote" the value, like this:
---
permalink: "'404.html'"
---
Or disable template processing of the permalink:
---
permalink: 404.html
dynamicPermalink: false
---
@awmottaz I filed that separate WebC issue at https://github.com/11ty/eleventy-plugin-webc/issues/47
Thanks!
Alternatively the pug issue is still present in 2.0. Workaround is to use dynamicPermalink
!
Describe the bug If I set the permalink for a page (in any way) the output contains what looks like HTML.
For example, if I set the following on my
src/404.pug
:The following gets written:
To Reproduce Steps to reproduce the behavior:
templateFormats
to['pug']
Expected behavior Expecting the following:
Environment: