-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
Looking for advice for a photo portfolio with a hierarchy of themes #59
Comments
Interesting! Sounds like you want to attach metadata to your images and add (one or more) tags to image files to make them part of a collection? I think I’d need to think about that a little bit more—but technically it should be somewhat trivial to get working in Eleventy. I’d have to make template-specific data files (new in 0.2.14) work with pass-through copy files (images). See https://github.com/11ty/eleventy/blob/master/docs/data.md#template-and-directory-specific-data-files Alternatively, you can make a small template for each image that contains the markup to render that image. Technically you couldn’t put them in BUT, ignoring all that bikeshedding, this is something that pagination is built for, if I understand your use case correctly? A main https://github.com/11ty/eleventy/blob/master/docs/pagination.md Lemme know if I’m way off here 😎 |
I think the thing that confused me when reading your report was the relationship between themes and galleries, can you elaborate more there? |
Maybe the confusion comes from the "theme" term. I didn't mean "theme" as a graphical interface theme, but more as a "topic". For example, I want to publish each photo from my trips in Hong Kong in several places:
About solutions:
Just thinking about a way, easier if the description is the same everywhere. Let's imagine I write this ---
title: The Hong Kong Symphony of Lights from The Peak
image: hk-symphony-from-peak.jpg
location_rank: 2
other_topics:
- urban-landscape
- long-exposure
---
[A Symphony of Lights](http://www.tourism.gov.hk/symphony/english/details/details.html)
is staged every night at 8:00 p.m. in Hong Kong.
The best place to enjoy the show is the
[Avenue Of The Stars](http://www.avenueofstars.com.hk/eng/home.asp), but the view from
[The Peak](http://www.discoverhongkong.com/eng/see-do/highlight-attractions/top-10/the-peak.jsp)
is really nice too, even if the music doesn't come so far.
You can find
[this place on Locationscout](http://www.locationscout.net/hong-kong/1578-the-peak-tower-above-hong-kong). Location comes from the parent folder if the second level folder in the path is I want this photo to be visible in these pages:
For photos that don't require any location, like studio portraits, I can put their Maybe the mapping between topics and locations and actual folders can be automated, but I can also create data files for this: Does it make sense? |
Hmm, after a re-read of this it sounds like the missing piece you’re looking for is just tagging! You create
Then in each of Not to overcomplicate things but just as an FYI you may also be interested in the Configuration API’s See this example:
You can manually add a group of template files to your custom collection and then iterate over them however you want. It’s kind of a bulk way of faking tags. Does that help? |
More info on that last part here: https://github.com/11ty/eleventy/blob/master/docs/collections.md |
I understand what you mean, but can I generate multiple pages for the same Markdown source? I would like to have these pages:
Of course, I would use one as a canonical. The one where the I want to be able to "hack" the URL to get one level up. Because if I don't do that, people will go to the Or maybe I should do it another way, much simpler, with all images in I'll do some tests like that. |
Huh, finally re-reading this and I think I see what you’re going for. Check out this
Output:
Gonna close this—please reopen if you have more questions! |
Looks like #955 could help here! 😍 |
Hi Zach,
I'm trying to use Eleventy to replace this website currently managed by Adobe Portfolio:
http://photosynthese.net/
I want to show my photos in several galleries, which have a hierarchy.
For example (with only the slugs) :
For each theme, I want to be able to show:
I've started creating folders for the themes in my new project based on eleventy-base-blog (and visible on Netlify), but I would like to be able to "attach" photos to multiple themes. For example, a photo can be both a "urban landscape" and be in "new york city". So the folders option looks not so adequate.
I started thinking about a data file to list the hierarchy, but then I don't know how to generate all pages, with the hierarchy "visible" in the clean URLs.
So I'm looking for advice, before I do anything that I could regret later… ;-)
Thanks!
The text was updated successfully, but these errors were encountered: