Personal blog and astro theme based on vhAstro-Theme
Blog Demo ➡️ https://www.wingedge777.com
Lighthouse result:
- ToC sidebar
- Added
Table of Contentsidebar into swup container, smoothingly show ToC and get permalink
- Added
- Add github action config for easy deployment
- Pernsonal server or github pages, depending on your choise.
- Comment system
- Kept twikoo only, rm waline
- Astro managed assets, minimizes outputs size
- Optimized: home-banner image size, speeds up page loadding
- Add
permalinkfor headerings - To add
i18npages - To add
light/darkmode
Edit locale dictionaries here:
src/i18n/dictionaries.ts
This file controls site text such as:
- header nav
- search placeholder
- sidebar labels
- pagination text
- archive/category/tag page titles
Default locale blog posts:
src/content/blog/**
English blog posts:
src/content/blog-en/**
Rules:
- Keep the same
idfor the same post across different languages categoriesandtagsshould match the target language- English pages are generated under
/en/... - Default locale keeps raw permalink without locale prefix
Example:
- Chinese post:
src/content/blog/hpc/post-name.md - English post:
src/content/blog-en/hpc/post-name.md
Generated URLs:
- default locale article:
/article/:id - english article:
/en/article/:id
Edit:
src/i18n/config.ts
Important fields:
DEFAULT_LOCALELOCALESLOCALE_SEGMENTBLOG_COLLECTION_BY_LOCALE
Current setup:
- default locale:
zh-CN - default locale path prefix:
"" - english path prefix:
"en"
If you change the default locale, also check:
src/i18n/dictionaries.tssrc/pages/**src/pages/en/**
Because current routing strategy is:
- default locale uses existing raw routes
- secondary locale uses prefixed routes like
/en/...
Thanks to vhAstro-Theme and its open source community

