compileOptions.permalink
default changed from true
to "raw"
for Custom Template Syntaxes
#2780
Labels
breaking-change
This will have to be included with a major version as it breaks backwards compatibility.
bug: API design misstep
Bugs caused by a bad default
feature: 🤟 custom template languages
eleventyConfig.addExtension API
needs-documentation
Documentation for this issue/feature is pending!
Milestone
Operating system
macOS Ventura 13.1
Eleventy
^2.0.0-beta.2 / 1.0.2
Describe the bug
Found while poking around replacing the built-in Markdown engine (see #2777) that when setting a replacement with
.addExtension('md', { ... })
, as exemplified in the docs, any explicit permalinks present in the frontmatter of.md
sources will get processed with the replacement engine, as observed a while back (#1019).This is a problem because most Markdown processors (including
marked
andremark
) will wrap a plain string such as/path/to/output/
in<p>
tags, thus breaking the output. I'm not sure if the default engine skips the Markdown step or whethermarkdown-it
simply doesn't wrap a plain string, but the issue only manifests when changing to a different engine.Reproduction steps
Eleventy config:
Content file:
Running Eleventy outputs the HTML to
_site / <p>hello-world / < / p>
.Expected behavior
If permalinks passing through the Markdown engine is inevitable, it would be great to get enough arguments to the
compile()
function for authors to be able to discern when to skip Markdown processing.Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: