#1840 Fix support for namespaced projects in the doc server
Merged by pingou. Opened by pingou.
fix_docs  into  master

Download 1840.patch

We have added support for namespaced projects in pagure and we need to
support hosting documentation for them but we have been using the
following route:
@APP.route('//')
This means that we are unable to distinguish between:
/repo/folder/file
and
/namespace/repo/file

This commit fixes that by introducing a forced f/ in the url in
between the stable part (repo, namespace/repo) and the dynamique one
(folder/file).

This break existing URLs pointing to specific parts of the documentation
but not URLs pointing to the top level.

This commit also adjusts the unit-tests accordingly.

2 new commits added

  • When linking to a folder put the trailing slash in the URL as well
  • Blacklist 'f' and 'c' as project names

rebased

definitely big +1 from me

4 new commits added

  • Style fix: put the regex in one line there is no need to have it on two
  • When linking to a folder put the trailing slash in the URL as well
  • Blacklist 'c' as project names
  • Fix support for namespaced projects in the doc server

rebased

Thanks for the review :)

Pull-Request has been merged by pingou

Metadata