File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -386,9 +386,9 @@ def build_docs(session):
386386 # Prepare the examples data for JavaScript
387387 examples_data = []
388388 for _ , metadata in sorted (all_examples_rst .items (), key = lambda kw : kw [1 ]["title" ]):
389- # Adjust the thumbnail and ref paths to be relative to the root
390- metadata ["thumbnail" ] = "/ _images/" + os .path .split (metadata ["thumbnail" ])[- 1 ]
391- metadata ["ref" ] = "/" + metadata ["ref" ] + ".html"
389+ # use relative paths so it works both locally and when deployed
390+ metadata ["thumbnail" ] = "_images/" + os .path .split (metadata ["thumbnail" ])[- 1 ]
391+ metadata ["ref" ] = metadata ["ref" ] + ".html"
392392 examples_data .append (metadata )
393393
394394 # Write the data to examples_data.json in the _static directory
You can’t perform that action at this time.
0 commit comments