Skip to content

Commit 22dea40

Browse files
Fix links to other versions in mkdocs documentation footer
The problem was that we didn't had access to the correct page name (the relative path to the source file without the .md suffix). In order for this fix to work mkdocs needs to integrate mkdocs/mkdocs#721 and create a new release.
1 parent caea59b commit 22dea40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/doc_builder/backends/mkdocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def append_conf(self, **kwargs):
122122

123123
data_file = open(os.path.join(self.root_path, docs_dir, 'readthedocs-data.js'), 'w+')
124124
data_file.write(data_string)
125-
data_file.write('\nREADTHEDOCS_DATA["page"] = mkdocs_page_name')
125+
data_file.write('\nREADTHEDOCS_DATA["page"] = mkdocs_page_input_path.substr(0, mkdocs_page_path.lastIndexOf(READTHEDOCS_DATA.source_suffix));')
126126
data_file.close()
127127

128128
include_ctx = {

0 commit comments

Comments
 (0)