I’m trying to use Templater to auto-generate tags based on the relative file path of each note. For instance, if a note is in the “media” folder, I want it to cough up the tag #media.
So far I’ve used this code, and it works just fine for one such folder-to-tag:
#<% tp.file.folder()
.split(' ').join('_')%>
However, what I want is something different. I want to show the FULL path, with each subfolder outputted as a tag.
i.e., if my note is in the directory “media/print/books”, I want my code to generate a tag that looks like: #media/print/books.
Does that make sense? Thanks!