Static, CMS-free blog powered by Astro, deployed via GitHub Pages Actions.
- Install deps:
npm i - Dev server:
npm run dev - Build:
npm run build - Preview:
npm run preview
- Edit
astro.config.mjs:- Set
siteto your domain (e.g.https://<username>.github.io). - For project sites, uncomment and set
base: '/<repo>'.
- Set
- Schema lives in
src/content.config.ts(validated with Zod). - Add posts in
src/content/blog/*.mdwith front-matter fields required by the schema.
- List:
src/pages/blog/index.astro - Post:
src/pages/blog/[...slug].astro - RSS:
src/pages/rss.xml.js
- Workflow:
.github/workflows/deploy.ymluseswithastro/action@v3to build andactions/deploy-pages@v4to publish. - Includes a daily cron for scheduled posts and a Lychee link checker job.
- To use sitemap,
@astrojs/sitemapis already configured inastro.config.mjs. - For a custom domain, add
public/CNAMEand setsiteto that domain.