fix: Correct source image path for thumbnails

This commit is contained in:
Tanner Collin 2025-06-22 17:45:04 -06:00 committed by Tanner Collin (aider)
parent 5331fcef6c
commit 0978e0479d

View File

@ -15,6 +15,7 @@ def generator_finalized(generator):
"""
output_path = generator.settings['OUTPUT_PATH']
content_path = generator.settings['PATH']
media_path = os.path.join(content_path, 'media')
thumb_dir = os.path.join(output_path, 'media', 'thumbnails')
if not os.path.exists(thumb_dir):
@ -33,7 +34,7 @@ def generator_finalized(generator):
# and STATIC_PATHS includes 'media'.
# We assume article.image is a path relative to the 'content' folder.
source_image_full_path = os.path.join(content_path, image_path_rel_to_content)
source_image_full_path = os.path.join(media_path, image_path_rel_to_content)
if not os.path.exists(source_image_full_path):
log.warning(f"Source image not found for article '{article.slug}': {source_image_full_path}")