Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footer: Check for mkdocs doctype too #7094

Merged
merged 1 commit into from
May 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -147,7 +148,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}:
stsewd marked this conversation as resolved.
Show resolved Hide resolved
path = re.sub('/index$', '', page_slug) + '/'
else:
path = page_slug + '.html'
Expand Down