Personal tech blog sharing practical AI workflows, tools, and insights. Built with Astro + AstroPaper template, deployed on GitHub Pages.
- Framework: Astro + AstroPaper template
- Hosting: GitHub Pages (auto-deploy via GitHub Actions)
- URL:
https://danyuchn.github.io/blog(future:blog.pdtlearning.com) - Language: Bilingual (English + Chinese)
# Install dependencies
npm install
# Start dev server (http://localhost:4321/blog)
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewCreate a .md file under src/data/blog/en/ or src/data/blog/zh/. Start from the template at .claude/templates/article.md; the full authoring spec lives in .claude/specs/article-spec.md, and tags must come from the allowlist in .claude/specs/tags.md (enforced by npm run check:content in CI):
---
author: Dustin Yuchen Teng
pubDatetime: 2026-02-12T04:00:00Z
title: "Your Post Title"
slug: en/your-post-slug
featured: false
draft: false
tags:
- ai-workflow
- ai-tools
description: 'A brief description for SEO and previews.'
---
Your content here...| Field | Required | Description |
|---|---|---|
author |
No | Defaults to site author |
pubDatetime |
Yes | ISO 8601 publish date |
modDatetime |
No | Last modified date |
title |
Yes | Post title |
slug |
Yes* | <lang>/<filename> — schema allows omitting it, but this repo's content validator requires it explicitly |
featured |
No | Show on homepage featured section |
draft |
No | Set true to hide from production |
tags |
No | Array of tag strings |
description |
Yes | SEO meta description |
- English posts:
src/data/blog/en/with slug prefixen/ - Chinese posts:
src/data/blog/zh/with slug prefixzh/
Push to main branch triggers automatic deployment via GitHub Actions.
git add .
git commit -m "feat: add new post"
git pushGitHub Actions will build and deploy to GitHub Pages automatically.
When ready to use blog.pdtlearning.com:
- In
src/config.ts, changewebsiteto"https://blog.pdtlearning.com" - In
astro.config.ts, remove thebase: "/blog"line - Add a
public/CNAMEfile with content:blog.pdtlearning.com - Configure DNS: CNAME record
blog.pdtlearning.com->danyuchn.github.io - In GitHub repo Settings > Pages, set custom domain to
blog.pdtlearning.com
src/
config.ts # Site config (title, author, description)
constants.ts # Social links, share links
content.config.ts # Content collection schema
data/
blog/
en/ # English posts
zh/ # Chinese posts
pages/
about.md # About page
index.astro # Homepage
posts/ # Post listing & detail pages
search.astro # Search page
tags/ # Tag pages
.github/
workflows/
deploy.yml # GitHub Pages deployment
- Search (Pagefind)
- Dark mode
- SEO optimized
- RSS feed (
/blog/rss.xml) - Sitemap
- Dynamic OG images
- Code syntax highlighting