Assign emoji to specific tags, or at a per-page basis
These emoji would then appear:
- In the page title (top bar)
- In page links
e.g. let’s say we assign 📕 to the #book tag. A page “Harry Potter” tagged with #book would then appear as e.g. “📕 Harry Potter”
How to configure?
- Perhaps a
iconkey in front matter for per-page configuration - Per tag… TBD
My thoughts on that:
tag-wise
+ does not clutter the front matter that much
+ scales great
- might overload the whole tag thing. In the end someone might need to use a book-icon tag, because of exceptions where a page tagged with book should become no icon at all
- what if a page has multiple tags with icons? Which icon will be chosen? Precedence?
icon: '' in frontmatter
+ No ambiguity with precedence of multiple icons
- Does not scale well. Has to be defined on every single page. Imagine you have a collection of 50 pages where you want an icon. You would have to update every single file.
rules in SETTINGS.md
+ best scaling
+ does not clutter front matter or tags
- what if a page has multiple rules that apply? Which icon will be chosen? Precedence?
- complex
I think a combination might be best.
I love this feature request.
@v411e I believe all options require the same amount of work:
- tag-wise. If you have 50 pages, you need to add a tag to each one of them in frontmatter (you can automatize this with templates for future pages of that type)
- icon: Same, you need an icon in every page
- SETTINGS.md I am not sure this option is any different from tag-wise as in the latter, you also need to define somewhere which icon will be assigned to each tag
If I could choose, I'd go for using tags and define a key:value list in SETTINGS.md with:
- tag:icon
And then in every page we would only need to add the desired tag.
I find this option cleaner. Using the same example of 50 pages, this option would mean having 50 pages with tags in their frontmatter, instead of 50 icons. Text is simpler to handle within the terminal, for example. Icons would only be present in SETTINGS.md
Hope this makes sense
@paletochen In regard to defining rules in SETTINGS.md: I was thinking about some kind of regex, but yeah I agree, tags are probably the best solution :)
Perhaps something like this?
decorations:
- tag: book
prefix: “📕”
This would allow for other type of selectors in the future and other type of decorations, like color, or background color. Now the question is if this should be named “decorations” or “linkDecorations” or something, and if it should apply just to the links or also appear in the page’s title?
Since this would be an ordered list, we can just say that “the first match wins”
Perhaps something like this?
decorations: - tag: book prefix: “📕”This would allow for other type of selectors in the future and other type of decorations, like color, or background color. Now the question is if this should be named “decorations” or “linkDecorations” or something, and if it should apply just to the links or also appear in the page’s title?
Since this would be an ordered list, we can just say that “the first match wins”
I think the implementation proposed is simple and efficient. I let you decide on the name :) As for the outcome, I'd love to see it apply on the page's title.
A graphical example of what I mean:
A setup like this:
decorations:
- tag: person
prefix: "🧑 "
would allow me to see a page like this:
it would appear in queries like this:
or like this:
while in the url, the true link would be https://mysilverbullet.com/Zef
and the file in the filesytem would look like this:
>ls -l
rw-r--r-- user user 521 B Thu Nov 15 18:28:43 2023 Zef.md
Yes that looks good. And I find your example strangely appealing 😛
@zefhemel Just checking how far in your priority list this feature is.
With current conversations around live replacements, I am wondering if this feature will be implemented anytime soon.
The reason being is that right now i have different sets of people based on their emojis
- team member -> [[emoji1 name]]
- peer -> [[emoji2 name]]
- 1:1 meetings -> [[emoji3 name]]
However, internally at work, all of them are referred to: name@
If i use a regex replacement to change from name@ to [[name]], it will then break all my templates where i search specifically for: [[emoji1 , or emoji2, etc