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

Installation Help #65

Open
nmmorette opened this issue Sep 3, 2021 · 3 comments
Open

Installation Help #65

nmmorette opened this issue Sep 3, 2021 · 3 comments
Labels

Comments

@nmmorette
Copy link

Hi guys, I think I'm missing something in the installation.
After the installation steps, my gallery looks like this:

{{< gallery dir="images/teste/" />}} {{< load-photoswipe >}}

2021-09-03 16_02_02-

2021-09-03 16_02_27-

@nioupola
Copy link

Hello,

What is the issue ? I used it recently and don't have any issue for the gallery. I used the load tag before the galery one.

@kishorbhat
Copy link
Collaborator

@nmmorette numerous people already use hugo-easy-gallery fairly successfully. Can you provide a link to your code? A single line and some screenshots are hard to troubleshoot with.

@Darthagnon
Copy link

Darthagnon commented Mar 28, 2022

@kishorbhat I'm having this same issue, as is #37. To reproduce:

  1. hugo new site
  2. Add Dream theme to /themes/dream folder, and enable theme in config.toml
  3. Add Hugo Easy Gallery code into /themes/dream, it won't overwrite anything.
  4. hugo new content/posts/article.md, then call {{< gallery dir="images/teste/" />}} {{< load-photoswipe >}} within the article.
  5. What happens: calling gallery skips any further page rendering, most noticeably hugo-easy-gallery.css and load-photoswipe.js are not loaded, so gallery render breaks (repeated images, etc.). Also, the rest of the article (after the gallery call) is not rendered by Hugo. Workaround: You can try and force the CSS and JS to load (e.g. config.toml >>[params.advanced], or by calling load-photoswipe first). Result of workaround: the CSS will fix the gallery display (it will look right), but the JS will not work, and the gallery will act as though Photoswipe was not called.

Further workaround:

  • Don't use {{< gallery dir="/img/folder/" >}}, use the following instead:
{{< gallery >}}
{{< figure link="/img/homepage/sydney-harbour.jpg" caption="Sydney Harbour" >}}
{{< figure link="/img/homepage/cc_jeepers.jpg" caption="Capital Chorus" >}}
{{< figure link="/img/arduino/test-setup.jpg" caption="Arduino test setup" >}}
{{< /gallery >}}

It will work, but is more work to set up.

EDIT: I tried the workaround from the Readme.md, as suggested here, adding code to the footer partial. It causes the script to complain of being loaded twice.

EDIT2: Here's an example site demonstrating the bug: https://github.com/Darthagnon/testt - git clone and then hugo serve -D will make it available on localhost:1313

EDIT3: seems to be a CSS thing. Adding some CSS (will share once I've narrowed it down) seems to (partially) fix it.

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

No branches or pull requests

4 participants