Automatically make upper and lower case aliases of a note titel in the YAML header

Things I have tried

Searched the forum and on google

What I’m trying to do


I am searching for a way to achieve UPPERCASE, lowercase and capitalized first letter conversion of a word. The reason is that I would like to:

  • create a link [[nameoflink]]
  • create the note of that link by clicking it
  • apply a template where the YAML header automatically include: aliases: [uppercase({{title}}), lowercase({{title}}),firstuppercase({{title}}) which when the template is applied creates this in the YAML header: aliases: [NAMEOFLINK, nameoflink, Nameoflink]

In this way I can more easily let the keyword be a part of a sentence no matter if it is the first word in a sentence, not the first word, etc.

1 Like

You can use the Templater plugin and then add the following code to the top of the template:

aliases: ["<%tp.file.title.toUpperCase()%>","<%tp.file.title.toLowerCase()%>","<%tp.file.title.charAt(0).toUpperCase()+tp.file.title.slice(1)%>"]

The Templater plugin will call the javascript to produce the aliases you want.


Thank you ScottKillen :slight_smile: That did exactly what I needed.

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