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

Unable to load gallery when a album directory contains capital letter #2887

Closed
2 tasks done
old6ix opened this issue Dec 17, 2022 · 1 comment
Closed
2 tasks done

Comments

@old6ix
Copy link

old6ix commented Dec 17, 2022

Preliminary Checks

Description

Markdown block has a shortcode called gallery. Its usage just like this:

{{< gallery album="path/to/demo" order="desc" resize_options="1024x1024" >}}

It usually works well. However, when path of an album contains capital letter, for example assets/media/albums/DEMO relative to project root, this statement will get an error like this during building:

ERROR 2022/12/17 11:55:43 Unable to load gallery `media/albums/DEMO/*` in `/home/runner/work/wowchemy-md-album-bug/wowchemy-md-album-bug/content/home/markdown.md`.
Error: Error building site: logged 1 error(s)
Total in 5643 ms
Error: Process completed with exit code 255.

Reproduction Link

https://github.com/jiabh/wowchemy-md-album-bug/

Steps to Reproduce

https://github.com/jiabh/wowchemy-md-album-bug/commit/ae238d45b69471c2ccc44ab2fbe930b85e8377d5

  1. Make an album with capital letters.
  2. Reference this album in a markdown block, as follows.
{{< gallery album="Demo" order="desc" resize_options="1024x1024" >}}
  1. Run hugo to build.

Expected Result

Build successfully, same as it was in lower case:

https://github.com/jiabh/wowchemy-md-album-bug/actions/runs/3719879953

Actual Result

Build failed with error Unable to load gallery.

https://github.com/jiabh/wowchemy-md-album-bug/actions/runs/3719894716

hugo: downloading modules …
hugo: collected modules in 5176 ms
Start building sites … 
hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended linux/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio
ERROR 2022/12/17 11:55:43 Unable to load gallery `media/albums/Demo/*` in `/home/runner/work/wowchemy-md-album-bug/wowchemy-md-album-bug/content/home/markdown.md`.
Error: Error building site: logged 1 error(s)
Total in 5643 ms
Error: Process completed with exit code 255.

What Hugo Module versions does your site use?

module github.com/wowchemy/starter-hugo-academic

go 1.15

require (
        github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.0 // indirect
        github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.0 // indirect
        github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v1.0.0 // indirect
        github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20221127215619-58b270a3e103
)

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

No response

Which Wowchemy template are you using?

starter-hugo-academic

What version of Hugo are you using?

Hugo Extended 0.108.0

@gcushen
Copy link
Collaborator

gcushen commented Dec 21, 2022

Have you seen the Gallery docs at https://wowchemy.com/docs/content/writing-markdown-latex/#image-gallery ?

The Gallery docs state:

Album names must be lowercase due to a Hugo bug - consider up-voting the bug with a 👍

If you want to fix the bug in Hugo, you can submit a PR to the Hugo repo on Github: https://github.com/gohugoio/hugo/

@gcushen gcushen closed this as completed Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants