Skip to content

Commit a3061bf

Browse files
junpenglaotwiecki
authored andcommitted
fix image
1 parent ee11ee9 commit a3061bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/sphinxext/gallery_generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ def build_gallery(srcdir, gallery):
159159
os.makedirs(source_dir)
160160

161161
# Create default image
162-
png_path = os.path.join(os.path.join(target_dir, "_images"), "default.png")
163-
shutil.copy(DEFAULT_IMG_LOC, png_path)
164-
create_thumbnail(png_path)
162+
default_png_path = os.path.join(os.path.join(target_dir, "_images"), "default.png")
163+
shutil.copy(DEFAULT_IMG_LOC, default_png_path)
164+
create_thumbnail(default_png_path)
165165

166166
# Write individual example files
167167
data = {}
@@ -179,7 +179,7 @@ def build_gallery(srcdir, gallery):
179179
data[basename] = {
180180
"title": " ".join(filename.split("_")),
181181
"url": os.path.join(os.sep, gallery, "../"+filename+".html"),
182-
"thumb": png_path,
182+
"thumb": os.path.basename(default_png_path),
183183
}
184184

185185
js_file = os.path.join(image_dir, "gallery_{}_contents.js".format(gallery))

0 commit comments

Comments
 (0)