melmothx / amusewiki

Text::Amuse-based publishing platform
https://amusewiki.org
Other
174 stars 26 forks source link

Character limitation for slugged URLs | Can you freed? #380

Closed rojenzaman closed 3 years ago

rojenzaman commented 3 years ago

It's a useless rule for articles with long titles.

Here is an example:

#title Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla (108)
#author The the the the the (20)

Generated URL by Amusewiki: the-the-the-the-the-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla-bla (96)

Real-life example:

#title Neo-liberalism has come to the University of the Witwatersrand through retrenchments, commercialisation, and privatisation. (124)
#author Lucien van der Walt (20)

Generated URL by Amusewiki: lucien-van-der-walt-neo-liberalism-has-come-to-the-university-of-the-witwatersrand-through-retr (96)

melmothx commented 3 years ago

Easy with "useless". You have to put a limit somewhere, because filesystems have a limit (without speaking about being unpractical):

https://github.com/melmothx/amusewiki/blob/2f9a6e33de28678d3813f1b709ff90f70b4e346c/lib/AmuseWikiFarm/Utils/Amuse.pm#L341

Also, when you create a text you have the option to choose a custom URI.