-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
YAML frontmatter rendered improperly #5377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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: gogs/gogs#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. |
Add goldmark-meta to render yaml frontmatter as a table Fix go-gitea#5377 Signed-off-by: Andrew Thornton <[email protected]>
Add goldmark-meta to render yaml frontmatter as a table Fix #5377 Signed-off-by: Andrew Thornton <[email protected]>
Add goldmark-meta to render yaml frontmatter as a table Fix go-gitea#5377 Signed-off-by: Andrew Thornton <[email protected]>
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):
The text was updated successfully, but these errors were encountered: