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

Error in Hugo v0.55.6 #1

Open
sardaukar opened this issue Jun 14, 2019 · 2 comments
Open

Error in Hugo v0.55.6 #1

sardaukar opened this issue Jun 14, 2019 · 2 comments

Comments

@sardaukar
Copy link

I've enable this on config.toml after cloning it to themes and I get this when I try to use a gallery:

Total in 56 ms
Error: Error building site: "/home/sardaukar/Code/OWN/hugo/blogV2/content/post/amiga-bbs-online-2019.md:7:1": failed to render shortcode "gallery": failed to process shortcode: "/home/sardaukar/Code/OWN/hugo/blogV2/themes/hugo-baguetteBox/layouts/shortcodes/galimg.html:8:36": execute of template failed: template: shortcodes/galimg.html:8:36: executing "shortcodes/galimg.html" at <$img.Fill>: nil pointer evaluating resource.Resource.Fill
@Schnouki
Copy link
Owner

Hi @sardaukar,

Thanks for getting in touch, and sorry about this... There are actually 2 problems here: poor error reporting from Hugo, and poor documentation from my part.

The error you've pasted here is basically Hugo complaining that it could not find an image.

hugo-baguetteBox relies on Hugo's image processing to automatically generate thumbnails. But this also requires your content to be organized in page bundles. Which basically means that instead of having your post in content/post/amiga-bbs-online-2019.md and images anywhere , you should have your post as content/post/amiga-bbs-online-2019/index.md with the images in the same folder. Then you can use {{% galimg target="image-name.jpg" %}}.

I'm working on improving this in several ways:

  • add an explicit error message
  • make galimg easier to use when there's just a target without any other parameter
  • add a full documentation with more examples

I hope I'll be able to push that in a few days.

Thanks again and I hope this helps! (And nice article BTW. I still have my old Amiga 500 at my parents' house but I've only ever used it for games when I was a kid 😅)

@sardaukar
Copy link
Author

I managed to tweak some code I found on dev.to to work with my setup so no rush to fix it ;)

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

No branches or pull requests

2 participants