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 @@ -104,7 +104,6 @@ def append_conf(self, **__):
104
104
# Handle custom docs dirs
105
105
user_docs_dir = user_config .get ('docs_dir' )
106
106
docs_dir = self .docs_dir (docs_dir = user_docs_dir )
107
- docs_dir = os .path .relpath (docs_dir , self .root_path )
108
107
self .create_index (extension = 'md' )
109
108
user_config ['docs_dir' ] = docs_dir
110
109
@@ -120,11 +119,16 @@ def append_conf(self, **__):
120
119
'%scss/readthedocs-doc-embed.css' % media_url ,
121
120
])
122
121
123
- docs_path = os .path .join (self .root_path , docs_dir )
122
+ # The docs path is relative to the location
123
+ # of the mkdocs configuration file.
124
+ docs_path = os .path .join (
125
+ os .path .dirname (self .yaml_file ),
126
+ docs_dir
127
+ )
124
128
125
129
# RTD javascript writing
126
130
rtd_data = self .generate_rtd_data (
127
- docs_dir = docs_dir ,
131
+ docs_dir = os . path . relpath ( docs_path , self . root_path ) ,
128
132
mkdocs_config = user_config
129
133
)
130
134
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