Skip to content

Commit 8384c78

Browse files
committed
Fix paths for recipe-of-the-day
Ooooops!
1 parent 3f26b09 commit 8384c78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)