Skip to content

Commit 1312ac2

Browse files
committed
Footer: Check for mkdocs doctype too
Mkdocs is also a htmldir doctype. Fix #7087
1 parent 8652573 commit 1312ac2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/api/v2/views/footer_views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from readthedocs.builds.constants import LATEST, TAG
1616
from readthedocs.builds.models import Version
1717
from readthedocs.core.utils.extend import SettingsOverrideObject
18+
from readthedocs.projects.constants import MKDOCS, SPHINX_HTMLDIR
1819
from readthedocs.projects.models import Project
1920
from readthedocs.projects.version_handling import (
2021
highest_version,
@@ -147,7 +148,7 @@ def _get_context(self):
147148
page_slug = self.request.GET.get('page', '')
148149
path = ''
149150
if page_slug and page_slug != 'index':
150-
if version.documentation_type == 'sphinx_htmldir':
151+
if version.documentation_type in {SPHINX_HTMLDIR, MKDOCS}:
151152
path = re.sub('/index$', '', page_slug) + '/'
152153
else:
153154
path = page_slug + '.html'

0 commit comments

Comments
 (0)