Closed
Description
Description
I'm getting an excerpt that contains raw markdown when I use custom front matter parsing from the docs: https://www.11ty.dev/docs/data-frontmatter-customize/.
To Reproduce
- Add this config to
.eleventy.js
eleventyConfig.setFrontMatterParsingOptions({
excerpt: true,
excerpt_separator: "<!-- excerpt -->",
excerpt_alias: 'my_custom_excerpt'
});
- Add to a markdown post that has a link
[test](example.com)
in the excerpt. - Call the custom excerpt
post.data.my_custom_excerpt
.
Expected behavior
I expect the link to render as a link
Actual behavior
It renders the raw markdown.
This is the markdown:
Last week I wrote up a [learning plan](https://www.jonathanyeong.com/blog-posts/phoenix-elixir-learning-plan/) for Phoenix & Elixir. In this post, I wanted to add an addendum to phase 1 of the plan and give a quick progress update.
Environment:
- Mac 10.15.6
- Eleventy Version - 0.11.0
Additional context
There are workarounds to this issue such as creating custom shortcodes, but would love to use the frontmatter excerpt..
Another, consideration is to render the markdown and then strip the tags. Stripping the tags is seen in frameworks such as Hugo (via plainify
- https://gohugo.io/functions/plainify/). And can provide a more uniform excerpt. Totally my opinion though! Feel free to ignore if it won't provide value!