jajaperson3 downloadsAdds `data-tags` metadata to link elements so they can be selectively styled by tag.
This simple plugin adds a markdown postprocessor which adds data-tags metadata to all internal links in the document.
This can then be used in conjunction with CSS snippets to selectively style links based on their tag.
For example, say we have the following files
file.md
I am a file, see also [[linked file]].
linked file.md
---
tags:
- public
- foo
---
# Title
Foo #bar
The the <a> element for [[linked file]] in file.md will have the property data-tags="public foo bar".
This can be then used in css, for example
.internal-link[data-tags~="public"] {
color: red;
}
styles all links resolved to files tagged #public in red.