diff --git a/_plugins/bidirectional_links_generator.rb b/_plugins/bidirectional_links_generator.rb
index f36787e..057635a 100644
--- a/_plugins/bidirectional_links_generator.rb
+++ b/_plugins/bidirectional_links_generator.rb
@@ -18,6 +18,19 @@ class BidirectionalLinksGenerator < Jekyll::Generator
"#{note_potentially_linked_to.data['title']}"
)
end
+
+ # At this point, all remaining double-bracket-wrapped words are
+ # pointing to non-existing pages, so let's turn them into disabled
+ # links by greying them out and changing the cursor
+ current_note.content = current_note.content.gsub(
+ /\[\[?(.*)\]\]/i, # match on the remaining double-bracket links
+ <<~HTML.chomp # replace with this HTML (\\1 is what was inside the brackets)
+
+ [[
+ \\1
+ ]]
+ HTML
+ )
end
# Identify note backlinks and add them to each note
diff --git a/_sass/_style.scss b/_sass/_style.scss
index 9833331..5c854aa 100644
--- a/_sass/_style.scss
+++ b/_sass/_style.scss
@@ -128,3 +128,15 @@ code {
padding: 0.1em 0.2em;
border-radius: 4px;
}
+
+.invalid-link {
+ color: #444444;
+ cursor: help;
+ background: #fafafa;
+ padding: 0 0.1em;
+}
+
+.invalid-link-brackets {
+ color: #ccc;
+ cursor: help;
+}