Share Link Shortener adds a checkbox in the share link modal that replaces the share link with a shorter version containing only the IDs of the topic and post.
This theme component is especially useful when sharing Discourse links on platforms that limit the maximum number of characters in a message, like Twitter or Mastodon.
Screenshots & video
In action:
Settings
Name
Description
remember preference
Remember if the user prefers shorter links using their browserās local storage.
I noticed a slight issue. The checkbox creation prevents the link text input content from being selected by default, and unfortunately, I donāt know how to fix itā¦
I remember seeing the formatting without any slug in a piece of official code yesterday or the day beforeā¦ I donāt remember where but I thought āhow, they use the syntax without the /-/ hereā which seemed to be a clue that such URLs seem to be fine.
If you happen to find a link about potential problems, that would be great
You can add more customization to use external shortlink systems, for example I am currently using yourl source code to set-up a website that supports shortlink is https://agentc.asia/s
This suddenly stopped working on my site (to be honest I have no idea when, I donāt use it frequently) but just noticed now itās not appearing on any of my themes though itās still enabled on all of them. I know that provides no useful information lol, but any idea?
After upgrading to the latest version of Discourse, I confirm the component doesnāt work anymore.
Iād need to have a look at the recent Discourse commits.
Itās a very simple theme component, so if someone wants to have a look and do a PR, itās also welcomed.