Get a file's Obsidian Publish URI via the API

Hi,

I tried to search in Obsidian API 0.16.3 and in this forum, but could not find, so I assume this feature does not exist in the API.

I’m developing a plugin named Shell commands and would like to add there a variable named e.g. {{obsidian_publish_uri}} so that the URI of a note file could be passed to executable shell commands.

This would need some way to obtain the Publish URI via the API (domain name + sitename + note path).

Example

I have a note file named Roadmap.md in my Shell commands documentation vault. I’d like to be able to get the following Publish URI via the API: https://publish.obsidian.md/shellcommands/Roadmap

Thank you! :slightly_smiling_face:

1 Like

I wrote a plugin for that, afaik there’s no API.
https://obsidian.md/plugins?id=copy-publish-url
I think making an API also wouldn’t work because one can use multiple publish sites with one vault.

1 Like