I want to insert a BUTTON to link to a database created using the official bases plugin, which requires me to copy and paste the database file’s URL. However, I discovered that when I created the button using the URL of the desktop database file and then ran the official sync, the button synced to my phone wouldn’t open. Upon checking the URL of this database file on the mobile device, I found it differs from the desktop URL. Can this issue be resolved? Alternatively, are there any workarounds? (I’m using the third-party “Button” plugin.)
Try using an Obsidan URI instead of the type of path you are using now. You can use the Copy Obsidian URL command (found in the command palette, the 3 dot menu, and other places) to get a URL that opens the current note.
This URL basically asks Obsidian to open the designated note (file). It works from the outside world, everywhere a URL can be clicked (a mindmap program, for example).
Problem : if you move your note, the link is broken.
Solution : strip the path part and keep just the filename :
obsidian://open?vault=Calepin&file=scrap
Now, as long as you don’t change the name of your note and as long as this name is unique across the whole vault, Obsidian will find the note wherever it resides inside the vault.
I have a Keyboard Maestro macro that does exactly this :