Can templater edit bookmarks.json?

I was able to write a templater template that creates a new note and moves it to an existing folder. It’s similar to a daily note and always has the date in the file name.

But now, I had an idea that it’d be nice to automatically create a bookmark of the note. Ideally, I’d like to have it where the bookmark title is something constant, like “DAILY NOTE”, and then when a new day happens, it’d find that title and replace the path with the new note’s path. For now, it wouldn’t need to be any fancy like detecting if that note is more current than the existing one (based on the file path name). First though, I just need to know how I might go about editing bookmarks.json in a way that I could incorporate that into the workflow I’ve set up with templater. Is this possible?
replace the path of an existing bookmark in bookmarks.json to point to the new note

I’m not sure about JS used in Templater being able to do this. I know files in the dot folder are inaccessible for Obsidian itself.

On a Mac or iOS using Shortcuts (especially on a jailbroken device), one could definitely do it, but as far as I remember, you’d need to specify a date or some long ID and would need to know how the bookmarks file is structured. I’m not sure the jq json processor would make it easier.

It’s definitely one way to do it, yes, to keep a copy in .md and replace the contents of the json file with the copy in .md. I’d do it like that.

  • Bear in mind though that config files are not supposed to be tampered with while Obsidian is open.

Some coder may have better ideas but frankly, I don’t really see the point of wanting to accomplish this.

I’m not to keen on starting to change files such as the bookmark.json file, although I reckon it can be done. However, regarding your use case of having a bookmark to a changing file, you might try to bookmark a note like suggested below which keeps refreshing itself to an embedded version of the daily note.