For base32-encoding, I’m currently using AFBase32. And, for manual conversions in my text editor, I’m using a similar Perl module. I’m also aware of a Ruby library but I haven’t tried that. An example screenshot with these IDs in use can be seen here.

To workaround the potential issue of breaking Obsidian URLs, it might be an option for a tool or plugin to specify a separate URL scheme (or amend the current URL scheme), then use this (together with the note ID from the note’s metadata) for external URLs. The resolver would then need to either transform to standard Obsidian URLs, or resolve the note itself directly.

Hi, we can use URI’s to open a note, make a new note, search, but I am concerned for longer lasting links. For example I have a note in my vault called “Project X Reference” and I link outside of obsidian to open this note for my project stuff;

obsidian://open?vault=my%20vault&file=Project%20X%20Reference

This might be a long lived note, and at one point I change the title, because I either split up the project in multiple sub-projects, or I change the title from “Vacation” to “Krete Vacation 2021”. In that case the obsidian URI is broken. I have to know where I left it to restore the link.

I want to propose linking to a YAML ID inside the note, or can even be in the Alias YAML metadata where there is a static ID, or generated ID (like a UUID)

The note will be:

---
id: 7cf7f411-28a8-43e2-85e3-6da816fc2afd
---

# Vacation Krete 2021

Where I can refer to the static generated obsidian ID. That way longer lived notes that are referenced outside of the obsidian vault, will not break.

Als for the URI scheme, maybe something like;

obsidian://open?vault=my%20vault&id=7cf7f411-28a8-43e2-85e3-6da816fc2afd

For now I need to be mindful that I do not change titles too much if for example URI’s are shared, or I need to tag a label somewhere that I know it is a static reference, but it would be awesome if obsidian can be robust enough to reference longer lasting notes that might travel and change titles a few times.

3 Likes

Thanks Jorg, but using YAML for the UUID was already proposed many times above. Glad to see that you’re also in agreement!

@thomaskern Can I suggest you edit your OP and/or the title to include the suggestion to use YAML for the UUID?

2 Likes

Hi,
My post was merged from a separate request so I didn’t see this. But I am glad there is a consensus :wink:

  • Jorgen
3 Likes

Looking at the way that Obsidian links work - the reference in the Obisdian URL is to a relative pathname. If you rename the Obsidian note (or move it, or re-name the folder), the link breaks.

This impacted my use of Hook, but also something as simple as posting a link to an Obsidian note into an Omnifocus task.

Any thought on using a Unique ID to craft these links, so that the note will maintain the same link?

4 Likes

I second this request. Currently, I try very hard to never move an Obsidian .md file, but it’s frustrating to not be able to reorganize as my Vault grows. I’m a big Hook user.

4 Likes

Use case or problem

Obsidian has an internal link looks like obsidian://open?vault=Test&file=Text.
It is not a good idea to made links name-dependent because:
Page can be with typo
Page can be renamed

In this case we can’t get access to page from another program and inside links that was made in plugins (like Katex).

Proposed solution

Solution 1. Create a link with note hash that will be permanent and use a table hash - name. Once name will be changed nothing happened.
Solution 2. Find and replace all text in all notes - find: obsidian://old_name – replace: obsidian://new_name.

Current workaround

Find and replace text in 3d party program.

1 Like

Asked by @moberaptor to create a plugin that will create and open UID notes by UID.
Currently, it only opens notes by UID. In the future would like the ability to generate those UID for your notes.

EDIT
Now I think what I can allow open any note using any frontmatter field(s) and not only id

7 Likes

Hi!.. what would be convenient UUID schemes to our notes, looking into publishing them in the WWW in the future?

I didn’t use the plugin since i can not find it from the community list.

Imho the note’s id should be auto generated, unique, and implemented in frontmatter as discussed.

But may I suggest to use nano-id instead of uuid?

And i also like the idea of using note’s id for the url of notes in Obsidian Publish beside of obsidian-uri. This will make the url of notes unaffected by the change of note’s name

I just ran into this issue when trying to store Obsidian URLs in my task manager, and I immediately realized that would be extremely fragile, especially for work in progress that’s likely to be refactored (files moved, renamed, etc.). Obsidian should store a UUID in YAML frontmatter and use that ID for the URL. Glad to see it’s already being discussed.

I think what you are looking for is the Advanced-URI plugin. It supports adding the uid field automatically.

3 Likes

Hi! I am using Advanced-URI as you suggested. Thanks.

Is there a way to copy the UUID in YAML with a keyboard shortcut ?

I also pose this question in How to set a shortcut to copy the value of a specific key in YAML front matter?