This document provides details on the setup and local development of the Astro-based website for the Newcomer Handbook. The main content for the site is sourced from README.md.
This handbook is now rendered as a static website using Astro and automatically deployed to GitHub Pages.
View the live site: https://XiyouMobile.github.io/Newcomer-Handbook/
The main page of the site displays the content of this README file.
Key files and directories for the Astro setup include:
/
├── .github/workflows/deploy.yml # GitHub Actions workflow for deployment
├── public/ # Static assets (favicons, images, etc.)
├── src/
│ └── pages/
│ └── index.mdx # Astro page that renders this README
├── astro.config.mjs # Astro configuration file
├── package.json # Project dependencies and scripts
└── README.md # This file (also the main content source)
To run the website locally for development or preview:
package.json changed):
pnpm install
pnpm dev
This will usually start the site at http://localhost:4321/Newcomer-Handbook/. The base path /Newcomer-Handbook/ is important for local preview to match the deployment.
pnpm build
This will generate the static files in the ./dist/ directory.
pnpm preview
src/pages/index.mdx imports this README.md file’s raw content and renders it.main branch, the workflow in .github/workflows/deploy.yml checks out the code, installs dependencies, builds the Astro site, and deploys the output to the gh-pages branch, which serves the GitHub Pages site.