Can the frontmatter be dynamic?
See original GitHub issueHi, I have a blog created with MDsveX written in Sveltekit and deployed on Netlify. It works amazingly.
But whenever I want to use images I have to use links in the blog post. I want to be able to import photos directly into the .svx files. Here’s an example of what I want to do:
Is something like this possible?
E: Can those variables, coverimg
and thumbnailimg
be exported and then imported along with frontmatter, because that would solve my problem as well?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Is it possible to create frontmatter dynamically? - support - HUGO
Basically, what I'm trying to do is build something inside the frontmatter. So the user creating the content file (the event owner, in...
Read more >What is Front Matter and How is it Used to Create Dynamic ...
Front matter is one of two main parts of markdown files. This part allows the storing and accessing of metadata vital to populating...
Read more >When making dynamic pages with local data, is it possible to ...
On my current site, I am generating dynamic pages based on a local data file. I would love to be able to use...
Read more >dynamic command doesn't work in the front matter - Reddit
Same issue here. Dynamic templater commands do not work IN YAML FRONTMATTER. It works perfectly fine in the body. The command remains after ......
Read more >Using Frontmatter with Dynamic Pages in Middleman 4
But I can't use Frontmatter in the template file, so I was thinking I could use a YAML data file instead? I tried...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This already works:
Interesting. I’ll have a think about this. We could even do something simpler for the common case and have some default handling for certain things:
That said we could also just detect this automatically (for images) and enable/ disable based on an boolean options, or do it based on extension instead:
In line with other parts of the design for v1, I’m likely to handle this in an ‘official’ plugin: