-
Notifications
You must be signed in to change notification settings - Fork 133
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
Rework <frontmatter> syntax rules #2295
Comments
I think this has been the case since day 1 of markbind. My guess is just that @damithc do you have any thoughts or context on this? @tlylt, I thought through #1753 abit more with #2187. Would having frontmatter and frontmatter tags of all pages available as nunjucks variables solve #1753? (filter the pages you want based on page frontmatter tags) |
completely forgot about that.. 🤦♂️ this would just be for deprecating the HTML version.
Specifically, we can support something like
|
I looked at the MR a bit closer, the syntax would be the same but the implementation should be moved from markdown to a preprocessing step before nunjucks. |
Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
#1753, #2187, #1251
What is the area that this feature belongs to?
Author Usability
Is your feature request related to a problem? Please describe.
Been thinking of this for a while. I think the above 2 more recent linked issues solidify the use case even further.
Not sure if there was any reason for the choice of
<frontmatter>
as frontmatter syntax.This type of syntax is overwhelmingly common in SSGs.
Describe the solution you'd like
Propose switching to the above syntax. Feature set wise (thinking about overriding of frontmatter properties) there shouldn't be an issue in preserving things. But it is a breaking change and migration work will again be needed.
Benefits:
<frontmatter>
is HTML, it can only be extracted after processing nunjucks + markdown. This makes frontmatter properties unavailable to nj + md processing and very difficult for HTML processing. It is only being used currently for post processing. Example use cases is in linked issues. Some things we can make available with this change are:Cons:
<frontmatter>
to---\n...\n---
syntax)On frontmatter merging:
<frontmatter>
currently from<include>
s. (honestly not too sure on the use cases for this)<include>
-ing an page will include its frontmatter properties)<frontmatter>
was<include>
-ed via a specific#hash
(new syntax only supports 1 frontmatter per file, at the top of the page)Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: