I love Obsidian Publish and am hoping to eventually use it for my personal website, digital garden, blog posts, etc. While it’s great to be able to rename notes within Obsidian and have all internal links update, this currently changes the page’s URL and so breaks any external links from other sites to the published page.
I would like to be able to specify a relative permalink or slug for the page in the frontmatter, so that even if I rename or move the note within Obsidian, any external links from other sites to my Obsidian Publish page won’t break.
Related feature requests (optional)
This is the only other mention of permalinks I could find on the forum is here: Non-markdown FIle Management Best Practices
I’d love to see some solution around this as well. I’m finding that as I built more and more notes, the note titles evolve over time as they shift based on “adjacent” note ideas.
While I link to my publish site from other websites I can easily control, I also primarily post note links in threads on certain social media platforms that lack an edit button.
I’m also having a huge problem with this, which makes it hard for me to share/link to my Publish material. The other problem is that physically reorganizing file locations also changes the link path.
Even just a consistent UUID would be better than the changing link names/paths.
I would also love this feature, honestly it’s strange that it’s still missing.
It doesn’t seem technically complicated, and it is extremely valuable. Without it, it is impossible to share links to my notes on the internet (knowing that most of them will break when I inevitably reorganize things).
Besides, by default the urls look pretty ugly (especially if you have notes with long names, spaces, capitalized words, and special characters in them), and custom links would fix that.
I think we should be able to add a
slug field to the frontmatter, and use it to specify a permanent url for a page.
So that a link that looks like this:
Could be made to look like this:
Agree it’s strange, not like this is a new problem on the Internet. I have stopped using Publish because I can’t reliably link notes elsewhere.
This is also a dealbreaker for me getting Obsidian Publish.
Having user friendly URLs is mandatory for my use-case.
@Licat some ideas on implementation:
- Add new frontmatter key/value pair:
- Should include validation when parsing to ensure only URL safe characters are included
- Update Obsidian Publish to check frontmatter for slug when publishing a page
- If found, check that the slug does not conflict with any other files/slugs
- Update Obsidian Publish router to support slugs
- Update internal links in Obsidian Publish to check for a slug, and to use that instead of encoded file name where present (can lookup by filename, then parse frontmatter if necessary)
Right now post urls in publish don’t look very good. Take a look at this example:
Another problem is that post urls are not permanent. As I’m writing notes (especially if I’m following the evergreen notes method), I want my file names to be pretty long - a sentence summarizing the contents of the note. And as I’m updating the note, its location in the folder structure and its file name will change, leading to broken links.
The solution - we need a slug or url field in the frontmatter that allows people to set the permanent and good looking url for a note.
I like the idea of custom URLs. I’d also like to add one related feature (should this be posted in a new topic?): Add alias URLs.
Alias URLs would work as secondary URLs that would redirect the browser to the main URL. For example, if you have shared a link to a note in your Obsidian Publish site, and then want to change the link later (using a custom URL like suggested in this topic), you will end up breaking the old link that you’ve already shared. If you could add the old link as an alias, the old URL would use a HTTP 301 redirect to redirect to the new URL. You would be able to define multiple alias URLs (if needed), and only one main URL.
The lack of permalinks is also a problem for just plain old notes outside of Publish. Any Obsidian URL is immediately broken as soon as the name of the note has changed (unlike internal links which automatically get updated when the name of the note is changed).
Slugs are an important and valuable implementation of permalinks. I second @lumenwrites solution of using
to make a permalink like this:
In addition to slugs, I think there should also be the ability to use UUID for permalinks. The syntax should be pretty simple:
creates the Publish permalink:
https://publish.obsidian.md/alexisrondeau/daa6c92e-8412-46ce-bf21-235b89ee66b0 and the Obsidian URL permalink:
This would be so so helpful for preventing broken links.
In addition, there could be a button in Settings called
Create Permalink for every note in vault, which would add the
uuid field to each notes YAML header and would generate a uuid for each note.
+1 for wanting article slugs to be configurable via YAML frontmatter.
That would suffice for me. I would suspect that adding support for foldering, like
articles/slug, would potentially conflict with the use of folders for notes. It does make it more jekyll-compatible though.
This would make my life so much easier.
My use case: I’m managing my todos in Trello, but storing all the information related to a task in my note-taking app. Then, I add the Obsidian URL to the Trello card to find the information I need. And I link to the Trello card link from Obsidian.
The problem: As soon as I change the name of a note, I can’t find the information again.
One idea that I had was: Create an alias with a unique ID in Zettelkasten format (YYYYMMDDhhmm). Then, link to that alias. However, that doesn’t seem work.
You could create a new note in Obsidian with the unique Zettelkasten ID. Then put the URL of that note in Trello. Then inside of that note you have an internal note to the link.
So you have a Trello card with a URL link to a Zettelkasten note, with an internal link to the actual note of the task.
It’s a little clunky but it could be a workaround until permalinks are added to Obsidian.