Skip to content

Commit

Permalink
Merge pull request #7094 from readthedocs/fix-old-mkdocs-projects
Browse files Browse the repository at this point in the history
Footer: Check for mkdocs doctype too
  • Loading branch information
stsewd authored May 19, 2020
2 parents 4fa419b + 1312ac2 commit 82aedba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readthedocs/api/v2/views/footer_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from readthedocs.builds.constants import LATEST, TAG
from readthedocs.builds.models import Version
from readthedocs.core.utils.extend import SettingsOverrideObject
from readthedocs.projects.constants import MKDOCS, SPHINX_HTMLDIR
from readthedocs.projects.models import Project
from readthedocs.projects.version_handling import (
highest_version,
Expand Down Expand Up @@ -148,7 +149,7 @@ def _get_context(self):
page_slug = self.request.GET.get('page', '')
path = ''
if page_slug and page_slug != 'index':
if version.documentation_type == 'sphinx_htmldir':
if version.documentation_type in {SPHINX_HTMLDIR, MKDOCS}:
path = re.sub('/index$', '', page_slug) + '/'
else:
path = page_slug + '.html'
Expand Down

0 comments on commit 82aedba

Please sign in to comment.