Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cover file optional #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dannystaple
Copy link

Instead of breaking here - make the cover file optional.

This fixes the error seen below when a cover file isn't present:

/srv/jekyll/_plugins/thumbnail_generator.rb:78:in `read': unable to open image 'assets/posts/foam-core-drawer-dividers/cover.jpg': No such file or directory @ error/blob.c/OpenBlob/3496 (Magick::ImageMagickError)

Instead of breaking here - make the cover file optional.
@oturpe
Copy link
Owner

oturpe commented Jun 6, 2021

Makes sense, not every site needs to have a cover for every doc. However, in the case where every doc is supposed to have a cover, it is useful if not having it alerts the user somehow during build. Crash and a stack trace is not the best way, but a warning would be useful. So, to cover both cases, perhaps something like this: A new entry for configuration option thumbnail: boolean required. If set to true, prints warning every time if cover is not found. If set to false, only prints a warning if the cover was explicitly set in the front matter, but still is was not found.

What do you think?

@dannystaple
Copy link
Author

I think that makes a lot of sense - make it optional, like a compiler warning flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants