Blog powered by Astro.
pnpm run dev # Start dev server
pnpm run build # Build for production
pnpm run preview # Preview production build
pnpm test # Run unit tests
pnpm run check # Run type checkingScaffold a new post with:
pnpm run new-post -- "My Post Title"
pnpm run new-post -- "My Draft Post" --draftThis creates a file like src/content/blog/2024-01-15-my-post-title.md with the frontmatter pre-filled.
You can also create posts manually in src/content/blog/:
---
title: My Post Title
date: 2024-01-15
---
Your content here...Add draft: true to hide from listing.
Unit tests live in src/utils/posts.test.ts and cover the shared utility functions used for slug generation, post filtering, sorting, and date formatting. Tests are run with Vitest.
CI (.github/workflows/deploy.yml) runs tests and type checking before every deploy.
The content of this project is licensed under the Creative Commons Attribution-ShareAlike 3.0 license.