Undoing the changes from faab355779f4db711627d425779fe9d1a6819e8c - it's better to just use the built in swig `reverse` filter to do this job...
When generating pages replace any spaces in the filename with hyphens so that links can work nicely…