From 129d13743bdbab3130685ffce2d8729e207a7a2f Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 2 Apr 2022 13:34:26 -0700 Subject: [PATCH] feat: grey out broken links --- assets/styles/base.scss | 5 +++++ content/_index.md | 15 ++++++++------- layouts/_default/_markup/render-link.html | 9 +++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/assets/styles/base.scss b/assets/styles/base.scss index 53d98f6f..9c9b41c1 100644 --- a/assets/styles/base.scss +++ b/assets/styles/base.scss @@ -185,6 +185,11 @@ article { padding: 0 0.1em; margin: auto -0.1em; border-radius: 3px; + + &.broken { + opacity: 0.5; + background-color: transparent; + } } } diff --git a/content/_index.md b/content/_index.md index 1f920e03..62fbb6bf 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,12 +2,13 @@ title: ðŸŠī Quartz 3.1 --- Host your second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening) for free. Quartz features -1. Extremely fast full-text search by pressing `/` -2. Display for backlinks of each note -3. Fully customizable local graph view -4. Endlessly powerful page and theme customization using CSS -5. Automatically generated tag and section lists of content -6. Beautiful link previews +1. Extremely fast full-text search by pressing `ctrl` + `k` +2. Wikilink support +3. Display for backlinks of each note +4. Fully customizable local graph view +5. Endlessly powerful page and theme customization using CSS +6. Automatically generated tag and section lists of content +7. Beautiful link previews ## Get Started > 📚 [Setup your own digital garden using Quartz](notes/setup.md) @@ -18,7 +19,7 @@ Not convinced yet? Look at some [community digital gardens](notes/showcase.md) b If you prefer browsing the contents of this site through a list instead of a graph, you can find content lists here too: - [All Notes](/notes) -- [Setup-related Notes](/tags/setup) +- [Setup-related Notes](/tags/set) ## Troubleshooting - 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 7ae8a3e9..64a9f7cc 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -6,6 +6,11 @@ {{- else -}} {{$spacedurl := replace $trimmed "%20" " " }} {{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}} +{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}} {{$rooted := default $spacedurl (strings.TrimRight "/" (.Page.GetPage $spacedurl).RelPermalink) }} -{{ .Text | safeHTML }} -{{- end -}} \ No newline at end of file +{{ .Text | safeHTML }} + +{{- end -}}