Document Tags
In Zettelkasten tags are usually redundant. wb
provides a simple
implementation that may serve as an additional grouping layer generating Backlinks.
Documents can be tagged via Front Matter.
Before rendering is triggered, wb
collects all the tagged documents, and writes unified tag index to disk in tags/
directory under Layout Root. This directory contains a list of all tags and can be referenced via [[tags]]
wikilink.
Default templates do not link the tag index out of the box.
👀 This documentation is tagged for illustrative purposes. You can access the tag index here. This document has been tagged as #interesting.
⚠️ The tags implementation comes with a couple of caveats:
-
the user must not keep any static, custom content under the
tags
directory, otherwise they risk data loss whenwb
overwrites that specific subdirectory contents. -
the user should not keep any document/directory explicitly titled/named
tags
in their Layout Root, otherwise linking to automatically generated tag index may become impossible via Wikilinks. In other words, if you decide to keep atags.md
file somewhere or a document annotated withtitle: tags
front-matter meta, the[[tags]]
reference will probably resolve to your document and not to thetags/
directory index.
So the rule of thumb is: if you like to use document tags, do not create your own files/directories named tags
.
Example
Assuming we have a sample set of documents tagged as follows:
doc1.md
---
title: Document one
tags:
- happy
---
...(contents)
doc2.md
---
title: Document two
tags:
- happy
- fun
---
...(contents)
wb
will create the following structure in :
tags
├── happy
│ └── index.md
└── fun
└── index.md
Such that:
-
happy/index.md
will contain links todoc1.md
anddoc2.md
, -
fun/index.md
will contain only one link todoc2.md
.
Additionally, both doc1.md
and doc2.md
rendered will be annotated with
#happy
and #fun
backlinks.