Create custom slug in the frontmatter using templater

Hi,

I want to create a slug field in the front matter. The filename should be fetched, then replace space with “-” & uppercase to small case.

eg:

Filename: My New Note Here.md
Slug: my-new-note-here


Context :

I host my osidian notes as website in Github Pages using Hugo. This creates a lot of problems with internal links.

Eg: If I point to a note in obsidian called "ABC 123".

Obsidian Generated MarkDown Link : [Abc 123](Abc%20123.md)
URL Generated in Hugo (Github) : abc.com/abc-123

It changes url into smallcase & replaces spaces (%20) with - .

A custom field slug in the frontmatter will be easy to copy paste.


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