fix: cjk support + demo page

This commit is contained in:
Jacky Zhao 2022-04-02 17:38:39 -07:00
parent cc86136bcb
commit 4fd983277e
7 changed files with 12 additions and 9 deletions

View file

@ -185,7 +185,7 @@ async function drawGraph(url, baseUrl, pathColors, depth, enableDrag, enableLege
const labels = graphNode.append("text") const labels = graphNode.append("text")
.attr("dx", 12) .attr("dx", 12)
.attr("dy", ".35em") .attr("dy", ".35em")
.text((d) => content[decodeURI(d.id).replace(/\s+/g, '-')]?.title || d.id.replace("-", " ")) .text((d) => content[d.id]?.title || d.id.replace("-", " "))
.style("opacity", 0) .style("opacity", 0)
.style("pointer-events", "none") .style("pointer-events", "none")
.call(drag(simulation)); .call(drag(simulation));

View file

@ -1,12 +1,13 @@
--- ---
title: 🪴 Quartz 3.2 title: 🪴 Quartz 3.2
--- ---
Host your second brain and [digital garden](https://jzhao.xyz/posts/networked-thought) for free. Quartz features Host your second brain and [digital garden](https://jzhao.xyz/posts/networked-thought) for free. Quartz features
1. Extremely fast full-text search by pressing `ctrl` + `k` 1. Extremely fast full-text search by pressing `ctrl` + `k`
2. Wikilink support 2. Wikilink support
3. Display for backlinks of each note 3. Display for backlinks of each note
4. [CJK + Latex Support](notes/CJK%20+%20Latex%20Test%20(测试).md) 4. Built-in [CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md)
5. Fully customizable local graph view 5. Fully customizable local graph view
6. Endlessly powerful page and theme customization using CSS 6. Endlessly powerful page and theme customization using CSS
7. Automatically generated tag and section lists of content 7. Automatically generated tag and section lists of content

View file

@ -1,5 +1,5 @@
--- ---
title: "CJK + Latex Test (测试)" title: "CJK + Latex Support (测试)"
--- ---
## Chinese, Japanese, Korean Support ## Chinese, Japanese, Korean Support
@ -36,3 +36,6 @@ $$
a & b & c a & b & c
\end{bmatrix} \end{bmatrix}
$$ $$
## RTL
More information on configuring RTL languages like Arabic in the [config](notes/config.md) page

View file

@ -49,6 +49,8 @@ More info about partials on [Hugo's website.](https://gohugo.io/templates/partia
Still having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md). Still having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
## Multilingual ## Multilingual
[CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md) comes out of the box with Quartz.
Want to support languages that read from right-to-left (like Arabic)? Hugo (and by proxy, Quartz) supports this natively. Want to support languages that read from right-to-left (like Arabic)? Hugo (and by proxy, Quartz) supports this natively.
Follow the steps [Hugo provides here](https://gohugo.io/content-management/multilingual/#configure-languages) and modify your `config.toml` Follow the steps [Hugo provides here](https://gohugo.io/content-management/multilingual/#configure-languages) and modify your `config.toml`

View file

@ -7,7 +7,7 @@ Still having trouble? Here are a list of common questions and problems people en
While you're here, join our [Discord](https://discord.gg/cRFFHYye7t) :) While you're here, join our [Discord](https://discord.gg/cRFFHYye7t) :)
### Does Quartz have Latex support? ### Does Quartz have Latex support?
Yes! See [CJK + Latex Test (测试)](CJK%20+%20Latex%20Test%20(测试).md) for a brief demo. Yes! See [CJK + Latex Support (测试)](notes/CJK%20+%20Latex%20Support%20(测试).md) for a brief demo.
### Can I use \<Obsidian Plugin\> in Quartz? ### Can I use \<Obsidian Plugin\> in Quartz?
Unless it produces direct Markdown output in the file, no. There currently is no way to bundle plugin code with Quartz. Unless it produces direct Markdown output in the file, no. There currently is no way to bundle plugin code with Quartz.

View file

@ -6,7 +6,7 @@ description:
Host your second brain and digital garden for free. Quartz features extremely fast full-text search, Host your second brain and digital garden for free. Quartz features extremely fast full-text search,
Wikilink support, backlinks, local graph, tags, and link previews. Wikilink support, backlinks, local graph, tags, and link previews.
page_title: page_title:
"🪴 Quartz .2" "🪴 Quartz 3.2"
links: links:
- link_name: Twitter - link_name: Twitter
link: https://twitter.com/_jzhao link: https://twitter.com/_jzhao

View file

@ -5,15 +5,12 @@
<script> <script>
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, { renderMathInElement(document.body, {
// customised options
// • auto-render specific keys, e.g.:
delimiters: [ delimiters: [
{left: '$$', right: '$$', display: true}, {left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false}, {left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false}, {left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true} {left: '\\[', right: '\\]', display: true}
], ],
// • rendering keys, e.g.:
throwOnError : false throwOnError : false
}); });
}); });