Open kmaasrud opened 3 years ago
This is a personal opinion, but i think that things should be kept simple - span rendering is fine. Having some "tag pages" is a nice idea, but it will be more complex in the end (customization, template, then the need of an index of tags listing all the tags, and so on - it can be endless, and more difficult / time-consuming to have something robust and easy to maintain). At least in first iterations. If really needed someday, maybe that kind of features could/should be "pluginized".
@SR-G thank you for adding some thoughts on this! I agree, advanced tag behavior should not be a priority. We already have links/backlinks for note discovery, tag pages would add a lot of complexity.
We'll go for basic styling of tags (and perhaps a collection of them listed at the bottom of the page) in the beginning, and reconsider more functionality at a later time :smile:
My feeling is a simple
<span class="tag">this-is-tag</span>
will work great, and we can just do a.tag:before { content: "#"; }
I currently do this in my theme for footnotes and I feel it's a sensible choice.
https://github.com/ratsclub/notes.victorfreire.dev/blob/master/theme/css/general.css#L217-L223
+1
Tag support in 1.0.0 would be as simple as pushing each parsed tag to the tags
field of Note
. No alterations to the content needs to be done in this case, as user might want their SSG to handle the tags as well.
Additionally, Vault
should contain a list of all tags and which notes contain them, to simplify generating an index page for the tags.
These tags can be both part of the front matter and contained in the text.
How should we format them? My feeling is a simple
<span class="tag">this-is-tag</span>
will work great, and we can just do a.tag:before { content: "#"; }
as part of the theme, if we want to have the tags prefixed by a#
.An idea would be to generate a separate page for each tag, that lists all the notes that include that tag. These "tag-pages" would of course not be listed in the sidebar. What do you think about this?