sopython/sopython-site

Wiki urls

Closed this issue · 2 comments

I realise I should have proposed this before the new release went live, and I apologise for not thinking of it sooner.

One of the purposes of having the wiki urls be a title, rather than a number, was to make the urls easier to read.

This has definitely been accomplished, but I think we could go a little bit further to make it much better (IMO)

Basically, at the moment a space is represented by %20 in the url, I propose that we use hyphens or underscores to improve the readability.

This would change

http://sopython.com/wiki/Canonical%20question%20ideas/

to one of the following

http://sopython.com/wiki/Canonical-question-ideas/
http://sopython.com/wiki/Canonical_question_ideas/

I think this should be a small amount of work which will make a big difference.

Since we're modeling this after MediaWiki, converting spaces to underscores would be the way to go. Like MediaWiki, it should accept both but always output the underscore version.

Aside from that, CanonItem uses inflection.parameterize which normalizes the title and uses hyphens. But it also doesn't care if the title is unique, since it ignores it.

911abe3

Spaces are converted to underscores when building urls.
Underscores are converted to spaces (and spaces are still accepted) when parsing urls.