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

Add per-album description #51

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add per-album description #51

wants to merge 3 commits into from

Conversation

awong234
Copy link

@awong234 awong234 commented Feb 4, 2024

Hello!

I am testing this gallery out and it seems to be just what I want, it's very nice thank you!

I have never written PHP before, so please bear with my naivete. I wanted to see if I could include some small information on an album basis; for example, if it's pictures related to a trip, write a few sentences about the trip and include an embed of the google maps trip, something like that. It's related to #17.

It seemed to me easy to just have a description.html file in each album folder, and if it has content, then display that content.

Not the most user-friendly, but writing a little bit of HTML isn't a huge ask nowadays I suppose. I tested that it works on my website.

I suppose to make it more robust and easier for people maybe adding a markdown conversion process so that the user doesn't have to worry about syntax errors in the html, they would just supply a description.md file in each album. But I guess I also like the low-dependency approach used here.

Anyway, it works for my purposes but obviously I haven't spent a lot of time thinking about a general solution to the problem or any problems associated with how this has been written, so I'm mainly writing this in case it can be useful for another user to patch into their code, with no expectation that it should be merged.

Thanks for the discussion!

add handling to detect and read some description.html
Updates template to read and display description.html if exists
Update light mode template to display description.html if exists
@david-novafacile
Copy link
Contributor

Thank you very much! 👍 Thats a great idea and will be included in v2.

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

Successfully merging this pull request may close these issues.

2 participants