Friendly Titles for Permanent URLs
Context
Dendorn publishes pages based on their ids, not their titles. See here. This makes it hard to find urls by their title when looking through browser history.
Proposal
Incorporate the title field into the URL. The way we'll probably implement this is to add a suffix at the end of the id. When the title changes, we can fallback redirecting on the url. There's two url formats that we could use:
- /notes/2fe96d3a-dcf9-409b-8a09-fdaa5a664433-foobar (this is used by loom)
- /notes/2fe96d3a-dcf9-409b-8a09-fdaa5a664433/foobar (this is used by stack overflow)
Not sure if there are noticeable tradeoffs of using one or the other.
I'd prefer it to be /notes/file-name-id. That way you can type http://kevinslin.com/notes/ into browser and then start typing http://kevinslin.com/notes/de to get autocomplete for dendron and etc.
Agree with above commenter. Here are examples from paper and notion.
Dropbox Paper: https://paper.dropbox.com/doc/Next-gig--BIzqfFZCHtlPMfm11frtVnZdAg-HNMimui0QtP9UvIksFhMd
Notion: https://www.notion.so/cosell/Grand-Product-Vision-and-Mission-5a0b39b20f984e6eb7a1f145b5dc66b3
Notice this format gets the title as far to the left as possible (ie. it shows up next to the rest of the readable portion of the url)
I’d also suggest supporting NanoID since it’s cosmetically more appealing than UUIDs in the url.
https://github.com/ai/nanoid#readme
Fair point. Will go for the dropbox/notion version. And thanks for the tip about nano-id, that should be a simple update :)
- I realize this is a big ask, but what if there were fully descriptive urls with some sort of versioning mechanism? Say someone tries to link to a url that has changed and then they are routed to a 404-esque page that says:
"This url no longer exists, here is a list of urls where that content now lives..."
This could be automatically generated from version control and mostly invisible to the user who is creating the site (except in the event of ambiguous changes, which probably requires a 'merge conflict resolution' of sorts).
-
If less breakable urls is the desired choice, I am a fan of something like
<base-url>/note/<note-id>with @scootklein 's nano IDs (+1!). -
And it's also probably worth mentioning that if less breakable urls is what people want, what does that imply about supporting anchor tags (www.example.com#header-1)?
There is a near-duplicate to this issue:
- https://github.com/dendronhq/dendron/issues/331
It asks to publish with just original filenames, but I think the combination of id+name suggested in this issue would also satisfy the linked one.
This resource would be very interesting, I was looking at Dendron's Blog/Wiki and I liked it a lot, but I missed the Friendly URL. So we can also use Dendron for Blog, Docs, Wiki and who knows in the future even for a company's main website with small adjustments in HTML and CSS.
With these tweaks and others, you can even make Dendron an alternative to Hugo, for more knowledge-focused use cases.
My use case today, I intend to use a Site/Blog + Wiki like Mediawiki for the knowledge base like tutorials, articles and etc. Since Dendron may be an option for Blog + Wiki/Doc
is there any movement on this? It would be a tremendous improvement on making urls more user friendly
@helle253 Nope: #3890