Files
folio/README.md
T
mtpsandClaude Opus 5.5 a1dd42f710 Make folio site-agnostic and add the @mtps/waves avatar ring
- Drop `site: 'https://ig.mtps.pl'`. Nothing reads it (no canonical,
  og:url or sitemap), and the app shouldn't know which site it builds.
- Example content and README samples use a placeholder profile
  instead of mtps / mtps.pl.
- Ring the avatar with @mtps/waves, Instagram-style; without an avatar
  the initial sits on the waves. `.npmrc` points @mtps at the Gitea
  registry, and pnpm-workspace.yaml exempts the scope from
  minimumReleaseAge.
- package.json version 0.3.0, matching the next tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:10:46 +00:00

2.7 KiB

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: Jane Doe
bio: Photos I'm happy with.
link:
  url: https://example.com
  label: example.com

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

The avatar ring is @mtps/waves, installed from the Gitea npm registry; .npmrc points @mtps there.

pnpm install
pnpm dev                                   # example content, http://localhost:4321
FOLIO_CONTENT=../my-site 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.