darrenkuro / obsidian-basetag

A lightweight obsidian plugin to render the basename of tags in preview mode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Obsidian Base Tag Renderer

This plugin renders only the basename for tags while maintaining the nested strucutres elsewhere.

It also appends a new class name (basename-tag) so it's possible to add custom style to it.

This is not actively maintained. As I haven't used Obsidian much, and they kept rolling out new features so it's a bit hard to keep up. I am currently busy with other projects also. Feel free to do a PR if you want to add something. The code structure is very simple. Issues aren't guaranteed to be resolved promptly but I'll try my best.

The custom css applied for the above example -

a.basename-tag[href*="animal"]::before,
span.basename-tag[data-tag*="animal"]::before {
    content: "๐Ÿ˜ ";
}
a.basename-tag[href*="cat"]::before,
span.basename-tag[data-tag*="cat"]::before {
    content: "๐Ÿฑ ";
}
a.basename-tag[href*="dog"]::before,
span.basename-tag[data-tag*="dog"]::before {
    content: "๐Ÿถ ";
}

Version 1.2 (July 30th, 2023)

  • Add text change for tags in property as well.

Version 1.1 (Feb 23rd, 2023)

  • Add support for editor mode including tags in the frontmatter.

About

A lightweight obsidian plugin to render the basename of tags in preview mode.

License:MIT License


Languages

Language:TypeScript 81.5%Language:JavaScript 18.5%