This repository houses the source of my personal website, built with Preact, Vite, Unocss, RemixIcon, and Netlify. I use pnpm as the package manager.
Ensure you have pnpm or install it with these instructions.
Clone the repository and install dependencies.
git clone https://github.com/alexander-ding/alexding.me
cd alexding.me && pnpm installBesides downloading Node packages, this also sets up Husky git hooks to automatically lint staged files when creating commits.
To spin up a development server, run
pnpm devTo create a production build locally, run
pnpm buildTo simulate a Netlify production build (this requires the Netlify CLI), run
pnpm build-devThis takes longer but is closer to the build process run on Netlify's servers, which allows you to debug Netlify-specific integrations, such as embedding build-time environment variables into the website and configuring routing information.
To serve the local builds, run
npx serve distTo deploy to production, simply push commits to the main branch. Netlify watches for commits and automatically triggers new builds as commits come in.