You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
some: yaml
content: here
---
We now get into markdown territory...
At the moment, milkdown-vscode will corrupt the front matter of any such .md file; the above content will be transformed into
***
some: yaml
content: here
-------------
We now get into markdown territory...
by a roundtrip through milkdown-vscode. It would be quite nice to be able to edit such .md files through milkdown, because Astro itself is all about working inside Visual Studio Code, creating content and implementing site functionality there.
So, in the end, this could possibly be made to work by adjusting the gfm plugin / enabling the gfm?
Perhaps a configuration option on milkdown-vscode along the lines of
Retain front matter in files (yes/no) - Some markdown files may contain a --- ... --- section at the very top - "front matter". If such front matter is present in a markdown file, retain this front matter section unchanged through edits.
?
The text was updated successfully, but these errors were encountered:
... and just discovered that another static site renderer, Jekyll (https://jekyllrb.com/docs/step-by-step/03-front-matter/), does front matter, too. That renderer also does markdown, so the use case for enabling --- fences would be much broader than just Astro.
For reference, https://jamstack.org/generators/ lists plenty of static site renderers; I'd guess more of these might do front matter, too (with renderer proprietary content that milkdown processing would ignore)
Astro (https://astro.build/) is the new hotness in content-rich static site rendering - and they have a concept called "front matter" (https://docs.astro.build/en/guides/markdown-content/) which simply has a "---"-enclosed section at the very top:
At the moment, milkdown-vscode will corrupt the front matter of any such .md file; the above content will be transformed into
by a roundtrip through milkdown-vscode. It would be quite nice to be able to edit such .md files through milkdown, because Astro itself is all about working inside Visual Studio Code, creating content and implementing site functionality there.
What confuses me a bit is that milkdown suggests that it does gfm-formatted markup (https://github.github.com/gfm/#tables-extension-), and those Astro frontmatter-enriched .md render fine inside the Github renderer (see, for exmple, https://github.com/withastro/astro/blob/main/examples/with-markdown-plugins/src/pages/index.md)
So, in the end, this could possibly be made to work by adjusting the gfm plugin / enabling the gfm?
Perhaps a configuration option on milkdown-vscode along the lines of
?
The text was updated successfully, but these errors were encountered: