-
-
Notifications
You must be signed in to change notification settings - Fork 552
Open
Labels
Description
Operating system
macOS Sequoia 15.6
Eleventy
3.1.2
Describe the bug
With the following config option the permalink
of a Markdown file is also rendered as Markdown. Resulting in HTML in the permalink: ./_site/<p>/test/</p>\n
.
export const config = {
markdownTemplateEngine: 'md',
};
Error output:
[11ty] Problem writing Eleventy templates:
[11ty] The template at './a-file.md' attempted to write to './_site/<p>/test/</p>
[11ty] ' (via `permalink` value: '/test/'), which is a target on the file system that does not include a file extension.
[11ty]
[11ty] You *probably* want to add a file extension to your permalink so that hosts will know how to correctly serve this file to web browsers. Without a file extension, this file may not be reliably deployed without additional hosting configuration (it won’t have a mime type) and may also cause local development issues if you later attempt to write to a subdirectory of the same name.
[11ty]
[11ty] Learn more: https://v3.11ty.dev/docs/permalinks/#trailing-slashes
[11ty]
[11ty] This is usually but not *always* an error so if you’d like to disable this error message, add `eleventyAllowMissingExtension: true` somewhere in the data cascade for this template or use `eleventyConfig.configureErrorReporting({ allowMissingExtensions: true });` to disable this feature globally.
[11ty] Wrote 0 files in 0.04 seconds (v3.1.2)
[11ty] Eleventy Fatal Error (CLI):
[11ty] The template at './a-file.md' attempted to write to './_site/<p>/test/</p>
[11ty] ' (via `permalink` value: '/test/'), which is a target on the file system that does not include a file extension.
[11ty]
[11ty] You *probably* want to add a file extension to your permalink so that hosts will know how to correctly serve this file to web browsers. Without a file extension, this file may not be reliably deployed without additional hosting configuration (it won’t have a mime type) and may also cause local development issues if you later attempt to write to a subdirectory of the same name.
[11ty]
[11ty] Learn more: https://v3.11ty.dev/docs/permalinks/#trailing-slashes
[11ty]
[11ty] This is usually but not *always* an error so if you’d like to disable this error message, add `eleventyAllowMissingExtension: true` somewhere in the data cascade for this template or use `eleventyConfig.configureErrorReporting({ allowMissingExtensions: true });` to disable this feature globally.
allowMissingExtensions
With the option allowMissingExtensions
the following file is created: _site/<p>/test/</p>
$ cat _site/\<p\>/test/\</p\>$'\n'
<h1>hello world</h1>
Reproduction steps
- Execute
npx @11ty/eleventy
with the following files:
a-file.md
---
permalink: /test/
---
# hello world
eleventy.config.js
export const config = {
markdownTemplateEngine: 'md',
};
Expected behavior
The permalink should be /test/
and a file should be written to _site/test/index.html
.
Reproduction URL
No response
Screenshots
No response