11ways / alchemy-shortlink

Shortlink plugin for AlchemyMVC
MIT License
0 stars 0 forks source link

Add a feature to manually or automatically add a URL segment to easily recognize shortened URLs. #2

Open roelvangils opened 4 months ago

roelvangils commented 4 months ago

Basic feature

When I create a shortlink, it is no longer recognizable (which is the intention, of course). I like to use the shortlinks in my notes and to-do lists as well. Therefore, I sometimes want to add additional info to the shortlink.

https://11ways.be/xxxxxx/whatever

All the shortlinker has to do is ignore everything after the /. The custom name of the shortlink doesn't need to be stored anywhere; It is just a redundant segment that you can add yourself to make the link recognisable for yourself.

Even better

Moreover, an interesting feature for certain types of links would be for the Shortlinker to automatically add an extra /segment based on the original URL. This would make the link more recognizable when shared, without the need to save the segment in the database. Users can remove the segment if they prefer to keep the URL as short as possible.

This is only useful for some websites and services. For example: it's good to know that a link will be a Google Doc, or a link to an email, before you click it.

Examples

skerit commented 4 months ago

But our shortlinks can be actually already be paths. So https://11ways.be/xxxxxx is a completely different link than https://11ways.be/xxxxxx/gdoc

You could add query parameters, those are simply ignored: https://11ways.be/w4xn9y?gdoc

roelvangils commented 4 months ago

Okay, that's a fair point 🙂