jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
5.93k stars 2.37k forks source link

Rendering frontmatter data in document #1179

Open robinsving opened 1 month ago

robinsving commented 1 month ago

Describe the bug When referencing frontmatter data in a document, one would use code similar to

---
name: banana
---

Name: `=this.name`

When rendered using Quarts, it will render as "=this.name"

To Reproduce Steps to reproduce the behavior:

  1. Create a new page
  2. Add frontmatter data
  3. Reference frontmatter data in document
  4. Render using Quarts
  5. See rendered page without the rendered frontmatter data in html page

Expected behavior The text of frontmatter data is rendered properly in the html

Screenshots and Source Rendered html: image

You can help speed up fixing the problem by either Link to my quarts repository: https://raw.githubusercontent.com/robinsving/pathfinder2e-notes/v4/content/Mechanics/Spells_Rituals/Spells/Level%209/Prismatic%20Sphere.md With rendered html: https://robinsving.github.io/pathfinder2e-notes/Mechanics/Spells_Rituals/Spells/Level-9/Prismatic-Sphere

Desktop (please complete the following information):

Additional context Build using GitHub action konstfish/quartz-build-action@v1 https://github.com/konstfish/quartz-build-action/tree/main

Odaimoko commented 1 week ago

Is this supported in any markdown grammar? At least Obsidian does not support it. Or is this feature stated in Quartz's documentation?

robinsving commented 3 days ago

Obsidian supports this, yes. I am using it myself. Linking an image.

image

Odaimoko commented 3 days ago

Do you use any plugin to achieve this? I paste your example to an empty vault, it renders as follows (Obsidian v1.6.3). If it's not a built-in markdown grammar, I guess we'd better not use bug as a tag, since it's not designed to do this. enhancement is a better choice.

image
robinsving commented 3 days ago

I'd have assumed that this is Frontmatter - are you saying that this is not the case? Perhaps dataview then?

robinsving commented 3 days ago

Yes, it is Dataview plugin. Change label as requested, if you are able