Mateusz PstruchaandClaude Opus 5.5 4b96b506d4 Split the site out: build from a content directory
folio is now only the app. Photos and profile come from FOLIO_CONTENT
(content/ with the example photos by default), so a site repo such as
mtps/ig.mtps.pl keeps its own content and deployment and builds a pinned
folio tag against it. The release workflow and deploy config moved there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:44:58 +02:00

folio

A single-page photo profile: name, bio and link on top, a justified grid of photos below (each photo keeps its own aspect ratio), and a detail view per photo. It's a static Astro site with no likes, comments or backend.

This repo is the app. Sites built with it live in their own repos and hold only their content and deployment, e.g. mtps/ig.mtps.pl.

Content

folio builds from a content directory: content/ (example photos) by default, or whatever FOLIO_CONTENT points at:

photos/
  2026-10-12-tatry.jpg    # ~2048px long edge, any crop (1:1, 2:3, 4:3, 16:9, …)
  2026-10-12-tatry.yml    # optional
profile/
  profile.yml             # name, bio, link
  avatar.jpg              # optional, otherwise the name's initial is shown

The file name becomes the URL, /p/<slug>. Photos are ordered newest first; undated ones go last.

photos/<slug>.yml, all fields optional:

description: Sunrise over Morskie Oko   # multiline works with |-
alt: Lake below a ridge at dawn         # defaults to the description
taken: 2026-10-12T06:41                 # defaults to EXIF DateTimeOriginal
location:                               # never taken from EXIF
  name: Morskie Oko
  lat: 49.2013                          # with lon: links to OpenStreetMap
  lon: 20.0712

profile/profile.yml:

name: mtps
bio: Photos I'm happy with.
link:
  url: https://www.mtps.pl
  label: mtps.pl

Published images are resized copies without EXIF. The build deletes the originals from dist/, and pnpm check:metadata fails if any published image still has GPS data or a capture time. Run it before publishing a build.

Development

pnpm install
pnpm dev                                   # example content, http://localhost:4321
FOLIO_CONTENT=../ig.mtps.pl pnpm dev       # a site's content
pnpm check                                 # types
pnpm build && pnpm check:metadata          # dist/

Using it for a site

Pin a folio tag in the site repo and build it against the site's checkout, the way ig.mtps.pl's release workflow does:

  1. Check out the site repo, and this repo at the pinned tag into folio/.
  2. Run pnpm install --frozen-lockfile and pnpm check in folio/.
  3. Build with FOLIO_CONTENT=$GITHUB_WORKSPACE, then run pnpm check:metadata.
  4. Ship folio/dist/.

Tag this repo (vX.Y.Z) for changes a site should be able to pick up. Tags here only mark versions; nothing is released or deployed from this repo.

S
Description
Photos I'm proud of — ig.mtps.pl
Readme
453 KiB
0 Stars 1 Watchers 0 Forks
Languages
Astro 56.9%
TypeScript 21.5%
JavaScript 14.2%
CSS 7.4%