FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
883 stars 62 forks source link

Native Lucide support #452

Closed NomarCub closed 4 months ago

NomarCub commented 6 months ago

As I understand, Obsidian has Lucide natively: https://docs.obsidian.md/Reference/CSS+variables/Foundations/Icons. I'd like to use Lucide icons without downloading them as a pack. This other plugin already does this: https://github.com/aidenlx/obsidian-icon-shortcodes.

FlorianWoelki commented 4 months ago

Hey there, I've added native Lucide support without downloading any additional icon pack. Would it be possible to get some test users for this feature?

You can use the beta plugin by using BRAT.

NomarCub commented 4 months ago

How do I try it? I'm not that familiar with BRAT. Don't you have to make a GitHub release for it to work?

I added https://github.com/FlorianWoelki/obsidian-iconize with Add Beta plugin, but clicking on the Lucide set still downloads the zip.

FlorianWoelki commented 4 months ago

How do I try it? I'm not that familiar with BRAT. Don't you have to make a GitHub release for it to work?

I added https://github.com/FlorianWoelki/obsidian-iconize with Add Beta plugin, but clicking on the Lucide set still downloads the zip.

Yeah I think you are right. I am also not familiar with BRAT and thought that it works with just the GH link. For me it was working, but I'll investigate this tomorrow :D Nevertheless, if you feel comfortable with it, you can always try to build the project and paste the files by yourself.

NomarCub commented 4 months ago

I built it, and it works like a charm, thank you!

One thing I noticed while building: https://github.com/FlorianWoelki/obsidian-iconize/blob/main/copy-file.js#L11 I think you should use path.join and basename here, so that the code is agnostic to whether the path has a separator (/ or \) at the end. Like so: const destPath = path.join(target.dest, path.basename(target.src));. You can avoid error prone string based path manipulation this way.

FlorianWoelki commented 4 months ago

Awesome. Yeah you are right, thank you for the suggestion!

FlorianWoelki commented 4 months ago

It's now released in v2.14.0.