File tree 1 file changed +7
-3
lines changed
readthedocs/doc_builder/backends
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,6 @@ def append_conf(self, **__):
96
96
# Handle custom docs dirs
97
97
user_docs_dir = user_config .get ('docs_dir' )
98
98
docs_dir = self .docs_dir (docs_dir = user_docs_dir )
99
- docs_dir = os .path .relpath (docs_dir , self .root_path )
100
99
self .create_index (extension = 'md' )
101
100
user_config ['docs_dir' ] = docs_dir
102
101
@@ -112,11 +111,16 @@ def append_conf(self, **__):
112
111
'%scss/readthedocs-doc-embed.css' % static_url ,
113
112
])
114
113
115
- docs_path = os .path .join (self .root_path , docs_dir )
114
+ # The docs path is relative to the location
115
+ # of the mkdocs configuration file.
116
+ docs_path = os .path .join (
117
+ os .path .dirname (self .yaml_file ),
118
+ docs_dir
119
+ )
116
120
117
121
# RTD javascript writing
118
122
rtd_data = self .generate_rtd_data (
119
- docs_dir = docs_dir ,
123
+ docs_dir = os . path . relpath ( docs_path , self . root_path ) ,
120
124
mkdocs_config = user_config
121
125
)
122
126
with open (os .path .join (docs_path , 'readthedocs-data.js' ), 'w' ) as f :
You can’t perform that action at this time.
0 commit comments