The discussion revolves around introducing a new type of permalink system for Discourse, using a special prefix (e.g., /go/ or /o/) to enable internal and external links that work seamlessly within the Ember.js app and on full page loads. riking proposes this to simplify linking to common community resources (like /go/install) and allow moderators to edit these links safely. Remah enthusiastically supports the idea. jomaxro suggests avoiding English words for prefixes, while riking considers /l/ or /o/links, noting prior art like GoLinks. codinghorror questions why such links would be internal-only, prompting riking to clarify that existing permalinks already work externally — the goal is to make them work internally too. codinghorror finds the dual permalink system confusing, but riking clarifies the new links would work both internally and externally. pfaffman highlights the current confusion when permalinks 404 internally but work on reload, and notes the complexity this adds to importers. vinothkannans suggests modifying the Ember unknown route to redirect to valid permalinks instead of showing 404s. eviltrout endorses the idea as a valuable project and encourages riking to pursue it next.
Looking for a check on if people would find this feature useful:
A special type of permalinks that work from posts and topics inside Discourse, which need a special prefix to make the routing work (here, let’s say /go/). (Current permalink records only work for requests that hit Rails first (new page loads + open in New Tab).)
These permalinks would be editable by moderators (less damage you can do when the URLs are scoped).
Use case: easily written URLs to common community resources, e.g. we could give each howto topic one or two link words, or create /go/install for the standard install.
Surveying interest because I frequently have big ideas nobody wants
I like the idea of permalinks that work within the site. If we can find a prefix that’s not an english word, even better. We’ve been slowly moving away from that. /groups/g, /users/u, etc.
Why internal links only? How do we explain that discourse.example.org/go/there, unlike every other hyperlink in the world, does not work when people click on it outside that specific Discourse instance?
Oh wait, you meant why the focus on “permalinks that work from posts and topics inside Discourse”? Because the permalinks already work for full-page loads. The Ember router is the only thing blocking forums from deploying this today with just a howto topic.
I just think it’s confusing to have two sets of “permalinks”, with totally different rules? One set works internal only, one set works.. external only?
“One works external only” is what we have today, I was proposing a category that would work for both. discourse.example.org/o/there should totally work when you click it from outside (unless forum’s login_required), and already works today for outside clicks if you set it up!
The only reason for a special prefix is to play nice with the JS app.
Though I understand why it’s the case, I have always found the “permalinks work only externally” thing really confusing. You got a link and get a 404, but if you reload it works. It would seem like rails could do that check before giving up.
The current state also means that you have to deal with permalinks twice in an importer, once for external links and again to rewrite links in posts.
Currently, in the “unknown” route we unconditionally displaying the 404 HTML. Instead, we can get the corresponding permalink of the current path and redirect the page if found.
I think extending permalinks to work internally would be a great project. @riking maybe once you finish up your current work you can try this as your next big thing?