Personal blog and portfolio by Herbert Yang, built with Docusaurus.
Live site: herbertyang.xyz
npm install
npm run startThe site runs at http://localhost:3000. For mobile testing on the same network:
npm run start -- --host 0.0.0.0npm run build
npm run serve # preview the build locallyDeployed on Vercel. Pushes to main trigger automatic production deployments.
- Scaffold a new post from the repo root:
npm run new-post -- "Your Post Title"For Chinese or non-Latin titles, provide a slug manually:
npm run new-post -- "你的标题" --slug your-slugOptions: --tags tag1,tag2 to add tags, --publish to skip draft mode.
- Preview locally:
npm startDraft posts are visible in dev mode but excluded from production builds.
-
Edit
blog/<year>/<date>-<slug>/index.md. Drop images into theimg/subfolder. -
When ready to publish, set
draft: falsein the frontmatter and merge tomain.
Galleries live in docs/gallery/. Use the make-gallery script to process photos:
cd docs/gallery/2025/album-name
make-galleryThe script processes img/originals/ into web-optimized images (img/web/) and thumbnails (img/thumbs/), then generates album.ts and index.mdx.
├── blog/ Blog posts
├── docs/ Site content (articles, galleries, cookbook)
├── public/ Additional content pages
├── src/ React components and CSS
├── static/ Static assets (images, favicon)
├── scripts/ Build and gallery processing scripts
└── vercel.json Deployment configuration