No description
- Astro 47.5%
- TypeScript 40.5%
- CSS 5.2%
- Shell 2.3%
- Python 1.7%
- Other 2.8%
|
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 3m51s
|
||
|---|---|---|
| .devcontainer | ||
| .forgejo/workflows | ||
| .vscode | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| astro.config.mjs | ||
| CONTEXT.md | ||
| DESIGN.md | ||
| package-lock.json | ||
| package.json | ||
| PLAN.md | ||
| README.md | ||
| sanity-typegen.json | ||
| sanity.cli.ts | ||
| sanity.config.ts | ||
| schema.json | ||
| skills-lock.json | ||
| tsconfig.json | ||
Philmori — Photography Portfolio
Astro (SSG) + Tailwind v4 + Sanity. Minimal, image-first photographer portfolio. Production: https://photo.philmori.com
See PLAN.md for the full design/decision record.
Stack
- Astro static site (SSG). React kept only for the embedded Sanity Studio at
/admin. - Tailwind v4 (light-only theme), self-hosted Inter via
@fontsource-variable/inter(no Google Fonts CDN — GDPR). - Sanity content (
f59mn4z8/production, public read dataset). - Astro View Transitions for cross-page fades,
@astrojs/sitemapfor sitemap.
Content model
| Type | Purpose |
|---|---|
category |
Field-driven nav sections (slug, order, description). Drives /[category]. |
work |
A photo series: categories[], client, year, cover, gallery, credits. |
homepage |
Singleton: curated full-bleed image wall, images optionally link to a work. |
siteSettings |
Singleton: name, tagline, bio, socials, contact, SEO description. |
Adding a category/work in Studio requires a rebuild to regenerate static pages (see auto-rebuild webhook below).
Routes
/— full-bleed image wall (homepage singleton)/[category]— grid of work covers (generated fromcategorydocs)/work/[slug]— full-bleed vertical gallery + credits/about,/contact,/imprint,/privacy
Commands
| Command | Action |
|---|---|
npm run dev |
Dev server at localhost:4321 |
npm run build |
Build static site to ./dist/ |
npm run preview |
Preview the build locally |
npm run typegen |
Extract Sanity schema + regenerate src/sanity/sanity.types.ts |
npx astro check |
Type-check .astro files |
After changing schema files: npm run typegen then npx sanity schema deploy.
Deployment
Forgejo Actions → Cloudflare Pages (wrangler CLI). See .forgejo/workflows/deploy.yml.
- Production: push to
master. - Preview: push any other branch (
--branch=<branch>→ CF preview deployment). - CI secrets required:
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID.
Auto-rebuild on content publish
Cloudflare Pages is not git-connected here (build runs from Forgejo via wrangler), so a CF deploy hook won't rebuild from source. Instead, trigger the Forgejo workflow:
- In Forgejo, create an access token with repo scope.
- In Sanity (manage.sanity.io → API → Webhooks), add a webhook:
- URL:
https://git.philmori.com/api/v1/repos/philmori/philmori-homepage/dispatches - Method:
POST - Header:
Authorization: token <FORGEJO_TOKEN> - Body:
{ "event_type": "sanity-publish" } - Trigger on: create / update / delete (published perspective)
- URL:
- The
repository_dispatch(typesanity-publish) handler indeploy.ymlrebuilds and deploys production.