diff --git a/scripts/new-photo-post.py b/scripts/new-photo-post.py index 5375c46..fed79c5 100755 --- a/scripts/new-photo-post.py +++ b/scripts/new-photo-post.py @@ -48,7 +48,7 @@ def main(argv): month = earliest_exif_date.month name = args.title if args.title else os.path.splitext(os.path.basename(photo))[0] - post_path = os.path.join(PHOTOS_CONTENT_DIR, str(year), str(month), name) + post_path = os.path.join(PHOTOS_CONTENT_DIR, f'{year:04}', f'{month:02}', name) try: hugo_command = ['hugo', 'new', '--clock', earliest_exif_date.isoformat(), post_path]