Skip to content

Commit 7038284

Browse files
Provide the source file name to the JS in readthedocs theme
readthedocs.org needs the file name in order to identify the correct source file to link to the same file in other versions of the same documentation or to the source on GitHub. Related readthedocs/readthedocs.org#1480
1 parent 74031a0 commit 7038284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdocs/themes/readthedocs/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% if current_page %}
2727
<script>
2828
// Current page data
29-
var mkdocs_page_name = "{{ page_title }}";
29+
var mkdocs_page_name = "{{ current_page.input_path[:current_page.input_path.rfind('.')] }}";
3030
var mkdocs_page_url = "{{ current_page.abs_url }}";
3131
</script>
3232
{% endif %}

0 commit comments

Comments
 (0)