Skip to content

Commit 67b9775

Browse files
committed
Return full path URL (including .html) on /api/v2/docurl/ endpoint
1 parent b1a8a80 commit 67b9775

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

readthedocs/core/templatetags/core_tags.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ def gravatar(email, size=48):
4040
def make_document_url(project, version=None, page=''):
4141
if not project:
4242
return ''
43-
return resolve(project=project, version_slug=version, filename=page)
43+
44+
path = resolve(project=project, version_slug=version, filename=page)
45+
if project.documentation_type in ('sphinx', 'mkdocs'):
46+
path += '.html'
47+
return path
4448

4549

4650
@register.filter(is_safe=True)

0 commit comments

Comments
 (0)