Helper for template plugin

Things I have tried

I searched on Obsidian help and on the forum.

What I’m trying to do

I would like to know if Obsidian supports any helper functions in the template plugin.

In particular, I would need a helper which capitalize the first letter of {{title}}. The reason is that I want to have the note filename to start with a lowercase such that [[filename]] is better integrated inside text, but the h1 title # {{title}} to start with an uppercase. Currently, I am just replacing with uppercase by hand, which is a slight annoyance.

If there is no helper, I would say that it could be a good feature to consider.


Update: The solution below works great, thanks to @Moonbase59 !

I think I would have preferred basic string operations implemented in the core since to avoid loading one more plugin, but for now it’s an excellent solution.

1 Like

Easy if you use the Templater plugin.

Just put a template like this in your file:

# <% tp.file.title.charAt(0).toUpperCase() + tp.file.title.slice(1) %>

:grin:

6 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.