- Linktree-style homepage with photo, social links, and self-hosted services (container registry, Git server) - Registry pages rendered on demand from Harbor via a live content collection, cached in memory (60s fresh, 10min stale-while-revalidate) - Pinned registry images (PINNED_IMAGES) shown first with a star - Node standalone server with security headers; self-contained server build so the Docker image ships no node_modules - Gitea workflow building multi-arch images for Flux Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
## Development
|
||||
|
||||
When starting the dev server, use background mode:
|
||||
|
||||
```
|
||||
astro dev --background
|
||||
```
|
||||
|
||||
Manage the background server with `astro dev stop`, `astro dev status`, and `astro dev logs`.
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation: https://docs.astro.build
|
||||
|
||||
Prefer the `astro-docs` MCP server (`search_astro_docs`) for Astro questions. It searches the current docs, so use it before relying on memory: APIs change between majors (this project is on Astro 7). Fall back to fetching the links below if the MCP is unavailable.
|
||||
|
||||
Consult these guides before working on related tasks:
|
||||
|
||||
- [Adding pages, dynamic routes, or middleware](https://docs.astro.build/en/guides/routing/)
|
||||
- [Working with Astro components](https://docs.astro.build/en/basics/astro-components/)
|
||||
- [Using React, Vue, Svelte, or other framework components](https://docs.astro.build/en/guides/framework-components/)
|
||||
- [Adding or managing content](https://docs.astro.build/en/guides/content-collections/)
|
||||
- [Adding styles or using Tailwind](https://docs.astro.build/en/guides/styling/)
|
||||
- [Supporting multiple languages](https://docs.astro.build/en/guides/internationalization/)
|
||||
|
||||
## Project notes
|
||||
|
||||
- Node adapter (standalone), started via `server.mjs` (adds security headers). Pages are prerendered by default; `/registry/…` and `404` use `prerender = false`.
|
||||
- Harbor data is live: `src/live.config.ts` + live loader `src/loaders/harbor.ts`, queried with `getLiveCollection()`/`getLiveEntry()`. Rendered pages are cached with `Astro.cache` (`memoryCache()`; `REGISTRY_CACHE` in `src/consts.ts`).
|
||||
- Harbor config comes from `astro:env/server` (all `secret`, so read at runtime, never inlined). Anonymous Harbor returns 401 for single-repo GETs; look repos up via the listing with `?q=name=…`.
|
||||
- Runtime deps must be listed in `vite.ssr.noExternal` (the Docker image ships no `node_modules`).
|
||||
- Zod comes from `astro/zod` (Zod 4).
|
||||
- `astro check` needs TypeScript 6 (TS 7 is unsupported), so keep `typescript@^6`.
|
||||
- Run `pnpm check && pnpm build` before finishing a change.
|
||||
Reference in New Issue
Block a user