Imported from xHemera/gem (
AGENTS.md). Install upstream withnpx skills add xHemera/gem. Copyright stays with the author.
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.
Project structure
src/data/pierres/*.yml— source de vérité des pierrespublic/images/pierres/{id}/— photos des pierressrc/lib/pierres.ts— loader YML vers TypeScriptsrc/lib/auth.ts— hash et vérification du mot de passesrc/lib/github.ts— Octokit pour commit YML + imagessrc/middleware.ts— HTTP Basic Auth : protège/edit/*et/api/pierres
Environnement
Copier .env.example vers .env et remplir :
# Générer un hash : bun -e "import('./src/lib/auth.ts').then(m=>console.log(m.hashPassword('m-dp')))"
EDIT_PASSWORD_HASH=salt:hash
GITHUB_TOKEN=ghp_...
GITHUB_REPO=xHemera/gem
Le username est ignoré — seul le mot de passe compte. La boîte de dialogue du navigateur s'affiche automatiquement.
Documentation
Full documentation: https://docs.astro.build
Consult these guides before working on related tasks:
