From b90590b9f487cdd49f019375fa5a09aad2e8ec1f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 08 Jul 2023 21:36:02 +0000
Subject: [PATCH] polish
---
quartz/plugins/transformers/links.ts | 3 ++-
content/showcase.md | 12 ++++++++++++
quartz/styles/base.scss | 9 ++++++---
quartz/plugins/transformers/ofm.ts | 2 +-
quartz/plugins/transformers/frontmatter.ts | 2 +-
content/philosophy.md | 2 +-
quartz.config.ts | 2 +-
7 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/content/philosophy.md b/content/philosophy.md
index 0502969..fe8e010 100644
--- a/content/philosophy.md
+++ b/content/philosophy.md
@@ -11,4 +11,4 @@
2. Having a public digital garden invites open conversations
3. It makes keeping personal notes and knowledge *playful and fun*
-**The goal of Quartz is to make sharing your digital garden free and simple.** Quartz exists as a tool to accomodate
\ No newline at end of file
+**The goal of Quartz is to make sharing your digital garden free and simple.** Quartz exists as a tool to accomodate
diff --git a/content/showcase.md b/content/showcase.md
index 8b7f1a8..4845f15 100644
--- a/content/showcase.md
+++ b/content/showcase.md
@@ -17,3 +17,15 @@
- [Mike's AI Garden 🤖🪴](https://mwalton.me/)
If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4-alpha/content/showcase.md)!
+
+Left-aligned text | Center-aligned text | Right-aligned text
+:-- | :--: | --:
+Content | Content | Content
+
+```mermaid
+sequenceDiagram
+ Alice->>+John: Hello John, how are you?
+ Alice->>+John: John, can you hear me?
+ John-->>-Alice: Hi Alice, I can hear you!
+ John-->>-Alice: I feel great!
+```
\ No newline at end of file
diff --git a/quartz.config.ts b/quartz.config.ts
index 4f17bd9..a07a4f2 100644
--- a/quartz.config.ts
+++ b/quartz.config.ts
@@ -95,7 +95,7 @@
}),
Plugin.ObsidianFlavoredMarkdown(),
Plugin.GitHubFlavoredMarkdown(),
- Plugin.CrawlLinks(),
+ Plugin.CrawlLinks({ markdownLinkResolution: 'absolute' }),
Plugin.SyntaxHighlighting(),
Plugin.Katex(),
Plugin.Description(),
diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts
index 660523b..8dd0a45 100644
--- a/quartz/plugins/transformers/frontmatter.ts
+++ b/quartz/plugins/transformers/frontmatter.ts
@@ -30,7 +30,7 @@
})
if (data.tags && !Array.isArray(data.tags)) {
- data.tags = data.tags.toString().split(" ")
+ data.tags = data.tags.toString().split(",").map((tag: string) => tag.trim())
}
// fill in frontmatter
diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts
index 03c8d43..17e30f5 100644
--- a/quartz/plugins/transformers/links.ts
+++ b/quartz/plugins/transformers/links.ts
@@ -6,7 +6,7 @@
interface Options {
/** How to resolve Markdown paths */
- markdownLinkResolution: 'absolute' | 'relative'
+ markdownLinkResolution: 'absolute' | 'relative' | 'shortest'
/** Strips folders from a link so that it looks nice */
prettyLinks: boolean
indexAnchorLinks: boolean
@@ -35,6 +35,7 @@
} else {
return './' + relativeToRoot(curSlug, targetSlug)
}
+ // todo: handle shortest path
}
const outgoing: Set<string> = new Set()
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 0e694d3..3bbb693 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -22,7 +22,7 @@
highlight: true,
wikilinks: true,
callouts: true,
- mermaid: false,
+ mermaid: true,
}
const icons = {
diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss
index 4eb6742..33eae9c 100644
--- a/quartz/styles/base.scss
+++ b/quartz/styles/base.scss
@@ -216,6 +216,10 @@
overflow-x: auto;
border: 1px solid var(--lightgray);
+ &:has(> code.mermaid) {
+ border: none;
+ }
+
& > code {
background: none;
padding: 0;
@@ -261,15 +265,14 @@
}
table {
- border: 2px solid var(--gray);
- width: 100%;
+ border: 1px solid var(--gray);
padding: 1.5rem;
border-collapse: collapse;
}
td, th {
padding: 0.2rem 1rem;
- border: 2px solid var(--gray);
+ border: 1px solid var(--gray);
}
img {
--
Gitblit v1.10.0