Massive-Wiki / massivewikibuilder

Massive Wiki Builder
MIT License
3 stars 3 forks source link

Enhancement request: switchable transformation for page filename to slug #34

Open peterkaminski opened 2 years ago

peterkaminski commented 2 years ago

Page filenames are currently transformed ("mangled") to URL-safe slugs by downcasing alphabetic characters and changing runs of any number of punctuation characters to underscore.

This transformation was chosen to create attractive and readable/editable URLs.

Other transformations might be desirable. This ticket envisages an ability to choose between more than one transformation.

For instance, another option might be to do the same transformation as GitHub.

Look at this file:

It shows how GitHub urlencodes a filename to a URL:

ABC-123-abc-123- !"#$%&')*+,-.:;<=>?@[\]^_`{|}~.md
ABC-123-abc-123-%20!%22%23$%25&')*+,-.:;%3C=%3E%3F@%5B%5C%5D%5E_%60%7B%7C%7D~.md