hugo-easy-gallery icon indicating copy to clipboard operation
hugo-easy-gallery copied to clipboard

how to implement gallery in HTML

Open vjfader opened this issue 6 years ago • 5 comments

this is more of a support question than a bug. I'm new to Hugo and static sites.

I managed to add your gallery to the blog post as markdown, but can't seem to add it into one of my pages (index, about...) , for example inside a HTML, is this possible?

what is the correct way to do this?

vjfader avatar Oct 20 '18 14:10 vjfader

Most likely HTML pages are not processed by Hugo. So if you need Hugo functionality (like the gallery) use Markdown files.

fte378 avatar Oct 25 '18 19:10 fte378

Could you give an example of how to add to markdown file, say about.md?

On Thu, Oct 25, 2018, 21:15 Frank Tegtmeyer [email protected] wrote:

Most likely HTML pages are not processed by Hugo. So if you need Hugo functionality (like the gallery) use Markdown files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/liwenyip/hugo-easy-gallery/issues/36#issuecomment-433172349, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWxvBCaXfmLwFtMJTaxtZ4iR3tVA6q2ks5uog3VgaJpZM4Xx9Np .

vjfader avatar Oct 25 '18 19:10 vjfader

It's the same like in testblog1.md. No difference.

As long as the generated page includes your footer shortcode the gallery will work.

fte378 avatar Oct 25 '18 19:10 fte378

I tried adding this to the about.md file (see below), but I don't see any changes on the about page.

+++
title = "About"
id = "about"
+++
some text!

{{< figure src="/img/1359007-bigthumbnail.jpg" title="Steve Francia" >}}
{{< gallery dir="/img/" />}} {{< load-photoswipe >}}
show image!!

vjfader avatar Oct 25 '18 19:10 vjfader

Ah I see - your theme seems to create the about page for you with values from the configuration file. Possibly your about.md has no effect at all.

fte378 avatar Oct 25 '18 19:10 fte378