Personal website and bilingual blog built with Astro and deployed on Vercel.
Visit www.lyt0112.com.
- Node.js 22.12.0 or newer
- Bun 1.2.0 or newer
git clone git@github.com:EmptyBlueBox/Blog.git
cd Blog
bun install --frozen-lockfile
bun run devRun all repository checks with:
bun run verifyThe command checks ESLint, Prettier, Astro types, and the production build. Use bun run fix to apply ESLint and Prettier changes.
Create a draft with:
bun run new-post -- article_namePosts live in src/content/post. Use article_name-en.mdx and article_name-zh.mdx for translated articles. /blog/article_name redirects to the English article when it exists and otherwise redirects to the Chinese article. A file named article_name.mdx uses /blog/article_name directly.
Each published post uses this frontmatter structure:
---
title: 'Article title'
description: 'A concise summary between 10 and 160 characters.'
publishDate: 2026-07-09
updatedDate: 2026-07-09
heroImage:
src: './cover_imgs/article_cover.jpg'
alt: 'A precise description of the cover image'
color: '#64574D'
draft: false
tags: ['Tag']
language: 'en-US'
---Valid languages are en-US and zh-CN. Local cover images are validated and optimized by Astro.
Article covers use responsive WebP images, and comment styles and image zoom scripts are served from the site's own assets.
One shared page-load handler records each visit. Translated articles share a counter and comment thread. Loading comments does not record another visit. Site totals include language-filtered blog pages and pagination, and are cached in the browser for ten minutes and on the server for five minutes.
Astro prerenders pages, RSS, robots.txt, and policy documents. The four routes under src/pages/api run on demand through the Vercel adapter. Vercel installs dependencies and runs bun run build using vercel.json.
- Code and templates use the Apache License 2.0.
- Original blog content uses the Creative Commons Attribution 4.0 International License.