Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic support for Obsidian style tags #10

Open
kmaasrud opened this issue Aug 25, 2021 · 5 comments
Open

Basic support for Obsidian style tags #10

kmaasrud opened this issue Aug 25, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@kmaasrud
Copy link
Member

kmaasrud commented Aug 25, 2021

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?

@kmaasrud kmaasrud added the enhancement New feature or request label Aug 25, 2021
@SR-G
Copy link

SR-G commented Sep 11, 2021

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".

@kmaasrud
Copy link
Member Author

@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 😄

@kmaasrud kmaasrud changed the title Support for Obsidian style tags Basic support for Obsidian style tags Sep 12, 2021
@ratsclub
Copy link
Member

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

@shivanthzen
Copy link

+1

@kmaasrud kmaasrud added this to the 1.0.0 milestone Mar 22, 2022
@kmaasrud
Copy link
Member Author

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.

@kmaasrud kmaasrud pinned this issue Mar 26, 2022
@kmaasrud kmaasrud removed this from the 1.0.0 milestone Apr 11, 2022
@kmaasrud kmaasrud unpinned this issue Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants