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.
Proposed solution
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.
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: https://publish.obsidian.md/andymatuschak/Andy+Matuschak/%C2%A7Enabling+environments%2C+games%2C+and+the+Primer
Could be made to look like this: https://publish.obsidian.md/andymatuschak/enabling-environments
Add new frontmatter key/value pair: slug: "some-url-compatible-string/goes-here"
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)
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).
creates the Publish permalink: https://publish.obsidian.md/alexisrondeau/daa6c92e-8412-46ce-bf21-235b89ee66b0 and the Obsidian URL permalink: obsidian://open?vault=My%20Vaults&uuid=daa6c92e-8412-46ce-bf21-235b89ee66b0.
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.
---
path: "slug-name-for-this-note"
---
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. ¯\_(ツ)_/¯
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.
I’ll think about a way to automate the process of “double-linking”, then I should be good to go.
(Created a Trello card saying: “Post solution for workaround…” and linked it to this thread. )
It’s also more future-proof than let’s say a UID that is stored in Obsidian’s database.
+1 and an idea for an easy implementation:
Allow obsidian://open?vault=MyVault&file=MyAlias to link to aliases. As long as the note keeps the alias, this link wouldn’t break on rename or move.
Yea, but AFAIK it’s not related to Obsidian Publish. Well, the title of this feature request is perhaps a bit ambiguous as it doesn’t mention Publish, but it’s mentioned in the actual post.
Anyway, it’s good to know such a feature exists in case I ever need it for non-online references.