Closed mcnesium closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
refresh/unstale
There is an open pull request for gogs: https://github.com/gogs/gogs/pull/4643
I have the same problem. Would be nice if the front matter just weren't rendered at all. Edit: I guess this should be implemented on the side of the markdown parser. Which parser is in use by Gitea?
@zeripath Do you think the change to goldmark makes a difference for this issue, does it have any specific support for it?
@davidsvantesson I haven't checked how it looks now, but Goldmark definitely has support for yaml frontmatter. It is used as the default renderer for Hugo which does also have yaml frontmatter.
@davidsvantesson @dakira we would need to use the https://github.com/yuin/goldmark-meta extension.
I guess it would probably be quite easy to do. The issue is deciding whether to always enable it or not.
I mean yaml front matter is a particular extension to commonmark - it may not be expected.
Exemplary, in a Jekyll project, markdown files have a YAML front matter like this default one in
index.md
:Gitea tries to render it as if it was regular Markdown:
Instead, it should detect it being the YAML frontmatter and render it properly, e.g. like this (screenshot created by adding four spaces in front of each line in the front matter):