From 2f6fe90b1d3b78d7eec857ff796ed1a867b27457 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 19 Feb 2019 19:23:59 -0500 Subject: [PATCH] Cleanup a little documentation_type from footer 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 https://github.com/rtfd/readthedocs-sphinx-ext/pull/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 #4638 --- readthedocs/restapi/views/footer_views.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/readthedocs/restapi/views/footer_views.py b/readthedocs/restapi/views/footer_views.py index bf66f5f80b2..703a915e070 100644 --- a/readthedocs/restapi/views/footer_views.py +++ b/readthedocs/restapi/views/footer_views.py @@ -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: