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

Plugin only work with article not on pages #113

Open
keulemaster opened this issue Mar 5, 2024 · 3 comments
Open

Plugin only work with article not on pages #113

keulemaster opened this issue Mar 5, 2024 · 3 comments
Labels
question Further information is requested

Comments

@keulemaster
Copy link

keulemaster commented Mar 5, 2024

Sorry i dont know where to ask for help.

i can put the gallery in articles and it works nice. but when i cut the gallery-header-line and paste it into a page, nothing showing. also no error.
my directory structure is simple:

root
--articles
--images
--pages

i just want to show all images in the imagefolder on a page called 'images'

is there maybe a hidden switch/config? googeling around doesnt show anything in this direction.

i use markdown for the sites.

@phibos
Copy link
Collaborator

phibos commented Mar 5, 2024

Most of the examples are for articles only. Did you modify the examples to also work with pages?

@phibos phibos added the question Further information is requested label Mar 5, 2024
@keulemaster
Copy link
Author

sorry i dont understand what you mean...i dont try the examples in the repo.

i am using the elegant theme and adding the gallery meta tag in an article shows me a gallery. thats fine. but if i do the same in a page file (in the pages dir), pelican doesnt put the html code to the output.

Thanks for your help!

@phibos
Copy link
Collaborator

phibos commented Mar 16, 2024

I had a look at the source of the elegant theme. Looks like the theme you use does only support galleries in articles.

Template for articles with gallery support https://github.com/Pelican-Elegant/elegant/blob/ad1bcea67f5515c8c448e1c7009f3ba01965d574/templates/article.html#L64-L74

Template for pages without gallery support https://github.com/Pelican-Elegant/elegant/blob/ad1bcea67f5515c8c448e1c7009f3ba01965d574/templates/page.html#L44

The included PhotoSwipe template does not add images to the output https://github.com/Pelican-Elegant/elegant/blob/ad1bcea67f5515c8c448e1c7009f3ba01965d574/templates/_includes/photoswipe.html

To add gallery support to all themes without modifying the theme itself would be to add a config switch to append the gallery to the generated content. This might improve the handling for people just want to start without modifying HTML source and still give the flexibility to experienced users.

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

No branches or pull requests

2 participants