Astro 5 + TypeScript + Tailwind static site for the lab. Content is Obsidian-driven with direct mapping from the Team-Guidebook/ vault. Dual-language routes /zh (primary) and /en (shell/empty state) are already scaffolded.
- Content destination:
.content/(gitignored) is the working directory consumed by the site. - Local development:
- Default source:
./Team-Guidebookif present. - Override via
CONTENT_DIR=/path/to/obsidianto point at any local vault folder. npm run devrunsscripts/setup-content.mjsbefore starting; it symlinks the source into.content/.
- Default source:
- CI / build (Vercel):
- Provide
CONTENT_REPO_URL(and optionalCONTENT_REPO_REF, defaultmain) to clone content into.content/before build. npm run buildwill trigger the same setup script viaprebuild.- See Deployment (Vercel) section for detailed setup instructions.
- Provide
- Manual preparation:
npm run setup:contenttriggers the setup script without running dev/build.
See Configuration Guide for detailed setup instructions, especially for private content repositories.
| Command | Action |
|---|---|
npm install |
Install dependencies |
npm run dev |
Prepare content, start dev server |
npm run build |
Prepare content, build to dist/ |
npm run preview |
Preview the production build locally |
npm run astro ... |
Run Astro CLI commands |
This project is configured for deployment on Vercel. The build process automatically:
- Runs
prebuildhook to sync content from the content repository - Builds the Astro site to
dist/ - Generates Pagefind search index in
postbuildhook
Configure the following environment variables in Vercel dashboard:
CONTENT_REPO_URL(required): GitHub repository URL for the content repository- Public repo:
https://github.com/username/Team-Guidebook.git - Private repo:
https://github.com/username/Team-Guidebook.git(Vercel GitHub App handles auth automatically)
- Public repo:
CONTENT_REPO_REF(optional): Branch or tag to clone from (default:main)PUBLIC_GISCUS_REPO(optional): GitHub repository for Giscus comments (e.g.,username/repo)PUBLIC_GISCUS_REPO_ID(optional): Giscus repository IDPUBLIC_GISCUS_CATEGORY(optional): Giscus discussion category namePUBLIC_GISCUS_CATEGORY_ID(optional): Giscus category ID
- Connect your repository to Vercel
- Configure environment variables in Vercel project settings
- Deploy - Vercel will automatically detect the Astro framework and use the configuration in
vercel.json
The build will automatically:
- Clone the content repository specified in
CONTENT_REPO_URL - Sync attachments from the content repository
- Build the static site
- Generate search index with Pagefind