Skip to content

Commit

Permalink
Cleanup a little documentation_type from footer
Browse files Browse the repository at this point in the history
This doesn't remove documentation_type completely from
the footer, but makes it more clear what we are really using.

We don't use `readthedocssinglehtml` as proven in readthedocs/readthedocs-sphinx-ext#58
We don't set `page` for mkdocs projects: https://github.com/rtfd/readthedocs.org/blob/f1c15d4f22af0ba7ebf762df1d49f7c28e8d01e5/readthedocs/doc_builder/backends/mkdocs.py#L207-L207

Ref readthedocs#4638
  • Loading branch information
stsewd committed Feb 20, 2019
1 parent 9b37cd9 commit 2f6fe90
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions readthedocs/restapi/views/footer_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,8 @@ def footer_html(request):
main_project = project.main_language_project or project

if page_slug and page_slug != 'index':
if (
main_project.documentation_type == 'sphinx_htmldir' or
main_project.documentation_type == 'mkdocs'
):
if main_project.documentation_type == 'sphinx_htmldir':
path = page_slug + '/'
elif main_project.documentation_type == 'sphinx_singlehtml':
path = 'index.html#document-' + page_slug
else:
path = page_slug + '.html'
else:
Expand Down

0 comments on commit 2f6fe90

Please sign in to comment.