So, I have not been able to track down similar issues, but I will say upfront that this code works (as expected) in production mode when deployed from netlify. However, dev mode and preview mode do not.
I used content collections (yaml data files w/ images) and SSG routing (for the individual photos) to make a photo gallery. However, after mapping out the collections in each category .astro file as thumbnails, the URL to the actual photo per thumbnail in dev mode do not include the category sub-directory it is in (e.g. bw/ or urban/) after photos/. Instead it links as photos/image-slug-name. Meaning, while in photos/category-name/, I get the thumbnail URL photos/image-slug instead of the expected URL photos/category-name/image-slug. Now if I included the sub-directory by typing it in the URL, i can manually pull up the generate route for single photo.
Now on the single photo page (generated by the [...slug].astro files), I have each photo linking back via '../', but it goes back to photos/ instead of photos/category-name. Once again, the category sub-directory is being ignored or skipped-over.
None of this happens in production. Production includes the sub-directory where appropriate and is fully functional, which you can see here: https://v9x.net/photos
My src/ folder structure distilled to relevance in case there is a folder structure issue.
- content
- bw/ (photos and .yaml files)
- urban/ (photos and .yaml files)
- config.ts
- pages
- photos/
- bw/
- [...slug].astro
- bw/
- urban/
- [...slug].astro - bw.astro
- urban.astro
- photos.astro
- photos/
To reiterate, if you visit my site, imagine the category thumbnails URL missing the category sub-directory and the link back on the image sends you back to photos/ instead of photos/category-name. That is what I am experiencing in dev mod.
Am I doing something wrong?