hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.09k stars 81 forks source link

Add helpers for String and URI manipulation in templates #165

Closed byteSamurai closed 1 year ago

byteSamurai commented 2 years ago

Because I needed it myself, I added helpers from a helper collection. I consider all helpers a bit overkill, but string and URI helpers should be sufficient for the most use cases.

Closes #59 Closes #89 too because of replace or dashcase filter

What happened apart from adding helpers:

@hans Your idea for this plugin is awesome. Would like to help more, if you'd like to.

byteSamurai commented 2 years ago

@hans WDYT?

hbhargava7 commented 1 year ago

Would love to see helpers added! Is there a list of which helpers are available currently?

hans commented 1 year ago

Thanks @byteSamurai for this wonderful contribution! I've just merged into develop and it will be included in the next release.

byteSamurai commented 1 year ago

A pleasure, @hans :)

However, I just tried to add author names as normalised tags, which brought me to what you did in the develop branch already. I need to admit dependencies of the handlebar helpers are everything but well maintained. I found a way to tweak the rollup config to rewrite the dynamic imports but... it's not beautiful.

Do you have a specific reason to stick with Handlebars? Maybe Nunjucks could be an alternative since it provides a good set of helpers (filters) already.

WDYT?