Installation & Usage
About 265 wordsLess than 1 minute
2025-10-10
Environment Requirements
Before using Twilight, make sure your system meets the following prerequisites:
- Node.js >= 20
- pnpm >= 9
- Git
Install Node.js
Visit the official Node.js site and download the latest LTS release.
After installation, open your terminal or command prompt and confirm the versions:
node -v
npm -vIf version numbers appear, Node.js and npm are installed correctly.
Install pnpm
If you do not yet have pnpm, install it via npm:
npm install -g pnpmVerify the installation:
pnpm -vInstall Git
Download the appropriate Git release for your operating system from the Git website.
After installation, confirm the version:
git --versionProject Setup Steps
0. Fork the repository
Click the Fork button in the repo's top-right corner to fork the repository to your GitHub account
1. Clone the repository
Click Code -> Open with GitHub Desktop, or run git clone <repository-url> (Git required)
2. Install dependencies
Run the following commands in the project directory:
# Install pnpm if not already installed
npm install -g pnpm
# Install project dependencies
pnpm install3. Configure your blog
- Customize blog settings inside
twilight.config.yaml - Manage site content inside
src/content
4. Start the development server:
Run the following command in the project directory:
pnpm devOnce the server starts, visit http://localhost:4321 in your browser to preview the site.
5. Build for Production
pnpm buildThe generated static files will be output to the dist directory, ready for deployment.
