jackyzha0 / quartz

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

"Markdownify" YAML Metadata Blocks When Building HTML #1549

Open aerithnetzer opened 2 weeks ago

aerithnetzer commented 2 weeks ago

First off, I love Quartz, this is a great project! I have only one small bottleneck.

Is your feature request related to a problem? Please describe. When I build my site, I often reference titles of works in the title of my articles, because I am a neurotic librarian, I must have them italicized in Chicago style. Currently, when I build the site with default settings

For example:

---
title: My *italicized* title
---

Does not render as My italicized title but rather as My *italicized* title

Describe the solution you'd like When I use

---
title: My *italicized* title
---

It renders on the site as My *italicized* title and not actually italicizing anything.

Describe alternatives you've considered On my fork of quartz, I used the DangerouslySetInnerHTML to make a hacky fix, but I don't like being forced to use Dangerous settings even when there is no user-generated content on the site. I simply do not have the knowledge of typescript to meaningfully contribute any other insight.

Additional context N/A

saberzero1 commented 2 weeks ago

The option DangerouslySetInnerHTML is called that because it executes any arbitrary HTML. That include <script> tags inside notes.

If you curated the content of your notes, there should be no issue.