This repository is an Astro-based blog deployed to GitHub Pages. Application code lives in src/: reusable UI in src/components/, page routes in src/pages/, layouts in src/layouts/, shared styles in src/styles/, and supporting utilities in files such as src/utils.ts and src/api/index.ts. Content is stored in content/ and organized by topic (content/posts/, content/vue/, content/javascript/, etc.). Static assets that should be copied as-is belong in public/. Build output is generated into dist/. Helper scripts live in scripts/, currently scripts/gen.ts.
Use pnpm with Node.js 24.x.
pnpm installinstalls dependencies frompnpm-lock.yaml.pnpm devstarts the local Astro dev server.pnpm buildcreates the production site indist/.pnpm previewserves the built site locally for a final check.pnpm lintruns ESLint with--fixacross the repository.pnpm genrunsscripts/gen.tsfor repository-specific content generation.
Follow the existing Astro, TypeScript, and component patterns already in src/. ESLint is configured through eslint.config.mjs using @antfu/eslint-config; semicolons are required, brace style is 1tbs, and console usage is allowed but warned. Use descriptive PascalCase names for Astro components such as BaseLayout.astro, and keep utility modules in concise camelCase or lower-case file names such as utils.ts. Prefer small, focused changes over broad refactors.
When the user asks for a blog post or article for this site, write the content into the repository instead of only returning prose in chat.
- Put new general blog articles under
content/posts/unless the user explicitly asks for another category. - Use Markdown by default; use MDX only when the article needs embedded components.
- Include frontmatter with at least
title,tags, anddate; adddescriptionwhen helpful for listing or SEO. - Follow the existing date format used in this repo:
"YYYY/MM/DD". - Keep the article title and body aligned with the source material, and include a source/reference section when the post is based on an external link or document.
- Before creating a new article, inspect nearby content to match the repository's current writing and frontmatter conventions.
- After adding or editing blog content under
content/, skip testing and build validation for.mdfiles. If the change touches any.mdxfile, runpnpm buildas the minimum validation to confirm the content collection and route generation still work.
There is currently no dedicated automated test suite in this repository. Treat pnpm lint and pnpm build as the minimum validation steps before opening a pull request, except when only updating .md files under content/; in that case, no testing is required. If a content/ change touches any .mdx file, still run pnpm build. When changing rendered pages, verify the affected routes in pnpm dev or pnpm preview. If you add public utility behavior, update the relevant documentation under docs/.
Follow Conventional Commits 1.0.0 for commit messages. Use the format <type>[optional scope]: <description> and keep the description imperative, concise, and scoped to one change.
- Prefer standard types such as
feat,fix,docs,refactor,perf,test,build,ci, andchore. - Use an optional scope when it adds useful context, for example
feat(blog): add article series navigation. - Mark breaking changes with
!after the type or scope, or with aBREAKING CHANGE:footer when more detail is needed. - Add a body or footer only when extra context, issue references, or migration notes are needed.
Pull requests should include a brief summary, note any content or configuration impact, link related issues when applicable, and attach screenshots for visible UI or page changes. Do not add new production dependencies without maintainer confirmation.
GitHub Actions in .github/workflows/pages.yml builds on pushes to main using Node.js 24 and deploys dist/ to GitHub Pages. Production builds read KEY from repository secrets, so avoid hardcoding credentials or environment-specific values in source files.