question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Looking for advice for a photo portfolio with a hierarchy of themes

See original GitHub issue

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) :

- in-the-city
 - street-photography
 - architecture
 - urban-landscape
- travel
 - europe
  - france
  - italy
   - venice
   - rome
 - north-america
  - united-states-of-america
   - new-york-city
- portraits
 - studio
 - outdoor
 - urban
- …

For each theme, I want to be able to show:

  • a title
  • a description
  • a list of sub-themes (with manual order)
  • a list of photos attached directly to this theme, not to sub-themes, with chronological order

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!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nhoizeycommented, Feb 22, 2020

Looks like #955 could help here! 😍

0reactions
zachleatcommented, Apr 17, 2018

Huh, finally re-reading this and I think I see what you’re going for.

Check out this njk template:

---
pagination:
  data: fileOutputs
  size: 1
  alias: filePath
fileOutputs:
  - photos/travels/asia/hong-kong/symphony-of-lights-from-peak/
  - photos/in-the-city/urban-landscape/symphony-of-lights-from-peak/
  - photos/long-exposure/symphony-of-lights-from-peak/
permalink: '{{ filePath }}/index.html'
---
You can use the alias in your content too {{ filePath }}.

Output:

Writing _site/photos/travels/asia/hong-kong/symphony-of-lights-from-peak/index.html from ./test.njk.
Writing _site/photos/in-the-city/urban-landscape/symphony-of-lights-from-peak/index.html from ./test.njk.
Writing _site/photos/long-exposure/symphony-of-lights-from-peak/index.html from ./test.njk.
Processed 3 files in 0.27 seconds

Gonna close this—please reopen if you have more questions!

Read more comments on GitHub >

github_iconTop Results From Across the Web

11 Tips for Making a Photography Portfolio in 2022
A good photography portfolio is concise and straight to the point. Your messages should be clear from start to finish. Once you have...
Read more >
Six ways to build a photography portfolio that attracts clients
1. Choose a clean website theme made for photographers · 2. Use only your best work · 3. Keep your portfolio updated ·...
Read more >
9 Design Tips to Make Your Portfolio Look Amazing
9 Design Tips to Make Your Portfolio Look Amazing · 1. Include White Space Between Design Elements · 2. Choose a Theme That...
Read more >
How to choose the right photography theme for your website
Learn how to choose the right photography WordPress theme for your website. Create a digital portfolio for your work that speaks for itself....
Read more >
Build a Photography Portfolio with WordPress - David Degner
I put a special emphasis on making sure my photos look good and the portfolio loads quickly because visitors will stay longer, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found