-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compileOptions.permalink
default changed from true
to "raw"
for Custom Template Syntaxes
#2780
Comments
The workaround is to use the For dynamic permalinks, the solution depends on a fix to #2777, as they are not currently pre-processed with Liquid/Nunjucks when the Markdown template engine is swapped. |
I think a very good case can be made to make the default |
compileOptions.permalink
default changed from true
to "raw"
compileOptions.permalink
default changed from true
to "raw"
compileOptions.permalink
default changed from true
to "raw"
for Custom Template Syntaxes
Shipping with 3.0.0-alpha.13 |
Cool, thanks! |
I suppose this change disables permalink templating globally, rendering Use template syntax in Permalink and part of front matter documentation obsolete:
The fix here is really to put the permalink under
|
No @jnv—this change is limited to Custom template languages that did not have a |
@zachleat Thanks for clarification, now I realize it's off topic for this issue since the issue I mentioned affects Nunjucks. I will try to investigate it and open a new issue if I manage to reproduce it with built-in template syntax. |
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: