Template Project: AstroPages-Bilingual
Screenshots


Background
As I mentioned in About, my blog was originally built for the purpose of job hunting, so the content naturally focused on showcasing myself. Now that the autumn recruitment season is over, I not only no longer need to “sell” myself, but I actually need to hide some of the personal information previously written for job applications.
On the other hand, the previous framework, AcademicPages, was quite bloated—specifically, it contained a lot of code and pages designed for academic needs that I didn’t require. Over a year of customization also led to an accumulation of “spaghetti code.” Furthermore, the classic combination of GitHub Actions + Pages + Cloudflare isn’t particularly editor-friendly, requiring local editing and Git commits. The CF CDN, which is necessary for access from Mainland China, also tends to cause delays in updates. Therefore, I decided to migrate directly to a new framework.
Tech Selection
My requirements mainly included cleanliness, aesthetics, and support for bilingual content (Native language and language of residence). Ideally, it should support direct submissions rather than requiring Git commits for new posts. Although my friends’ blogs (see the footer links) all use Hugo, both Gemini 3 Pro and ChatGPT 5.2 recommended that I use Astro (Framework) + Keystatic (Editing/CMS). For the theme, the choices were Starlight (documentation-focused) or AstroPaper (minimalist blog-focused).
Ultimately, I chose a setup based on Astro v5 + AstroPaper, Keystatic CMS, and Cloudflare Pages. Below is an AI-generated comparison:
| Dimension | AcademicPages (Old) | Hugo (Standard) | Astro + Starlight | Astro + AstroPaper | AstroPaper Mod + Keystatic (Final) |
|---|---|---|---|---|---|
| Underlying Framework | Jekyll (Ruby) | Hugo (Go) | Astro (TS/Vite) | Astro (TS/Vite) | Astro v5 (TS/Vite) |
| Core Positioning | Academic Resume, Paper Showcase | General Static Site | Documentation Site | Minimalist Blog | Modern Bilingual Blog + CMS |
| Build Speed | Slow (Ruby Gems dependencies) | Extremely Fast (Go binary) | Fast | Fast | Fast (but slower than Hugo) |
| UI/UX Style | Traditional resume style, dated | Diverse themes, varying quality | Sidebar nav, high info density | Paper texture, comfortable typography | Retains AstroPaper look, adds bilingual toggle |
| i18n Support | Poor (Requires heavy Liquid hacking) | Good (Native support, depends on theme) | Excellent (Native routing-level i18n) | None (No native multi-language support) | Custom Adapter (Via Astro v5 routing + Collections) |
| Content Management | Pure Git operations | Pure Git / External CMS | Combined with MDX | Combined with MDX | Keystatic (Git-based CMS) |
| Reason for Rejection/Selection | Deprecated: Redundant code, bloated for non-academic use, high maintenance cost. | Deprecated: High barrier to modifying Go Templates; hard to find a minimalist theme with perfect bilingual support. | Deprecated: Layout mismatch. While i18n is perfect, it’s designed for docs. Using it for a timeline-based “blog” requires too much layout hacking. | Base: UI/UX perfectly fits aesthetic. Clear code structure. Lacks i18n, but the cost of implementing it is lower than hacking Starlight’s layout. | Selected: Built on AstroPaper’s excellent UI, filled the i18n gap, and introduced Keystatic to solve publishing workflow pain points. |
Development
There isn’t much to say about the development process itself; it was quite tedious, so I just asked AI to summarize it for me:
Based on the user’s Git commit history, since version 5.5.1 (commit 25d2543), significant secondary development has been performed on the framework, mainly focusing on deep integration of Bilingual Support (i18n), enhancement of the Reading Progress Bar, and improvement of Deployment Documentation.
Here is a detailed summary of the modifications:
1. Core Feature: Full-Site Bilingual/Multi-language Support
This was the largest and most core modification, transforming the original single-language blog into a system supporting both Chinese and English.
- Infrastructure Setup:
- Initialized the bilingual blog structure, distinguishing language-specific pages and components (
c84be7d). - Implemented routing and content rendering logic based on language (
928cdbc).
- Initialized the bilingual blog structure, distinguishing language-specific pages and components (
- Routing & Redirection:
- Added redirection for the
/zhpath and introduced SSR (Server-Side Rendering) mode to handle dynamic paths under the/zhroute. The root directory defaults to Chinese without the/zhprefix. - Implemented a language detection mechanism based on URL and added support for redirection based on user preference (
0bc1f99,1bdd7ba). - Optimized language processing logic in the Header component to improve path matching accuracy (
f40d73b).
- Added redirection for the
- RSS Subscription:
- Implemented language-specific RSS Feed generation, allowing readers of different languages to subscribe to corresponding content (
94d39ee). - Updated language processing in RSS and HTML attributes (
e710844).
- Implemented language-specific RSS Feed generation, allowing readers of different languages to subscribe to corresponding content (
2. Deployment & Documentation
Updated documentation and instructions for the Cloudflare Pages deployment environment.
- Deployment Guide: Updated deployment instructions for Cloudflare Pages (
611e8ac) and corrected guidelines regarding forking the repository (a2b1dd6). - README Updates:
- Added suggestions regarding Cloudflare Rocket Loader and clarified the connection process for GitHub CMS (
51a7dc0). - Explicitly added the blog link in the README to demonstrate the actual usage effect of the template (
a0baa5c).
- Added suggestions regarding Cloudflare Rocket Loader and clarified the connection process for GitHub CMS (
Summary
Building upon the original AstroPaper (v5.5.1), the developer successfully implemented a complete internationalization overhaul, equipping it with production-ready bilingual capabilities (including routing, content management, preference persistence, RSS, etc.). At the same time, the progress bar UI was customized, and relevant deployment and maintenance documentation was perfected.
Other
Deployment
For deployment, simply connect Cloudflare Pages to the Git repository. CF will automatically rebuild and update whenever changes are pushed to the repo. After deployment, you need to configure Keystatic; specific procedures are detailed in the template repository page.
Optimization for Mainland China
Theoretically, services like EdgeOne should offer similar Pages build services while providing better network optimization for Mainland China. However, I don’t have a strong need for this recently, so I’m sticking with Cloudflare Pages, which I’m already used to. In most cases, connectivity is sufficient—as for the direct access speed, just ignore that part. If you have requirements for access from Mainland China, consider using EdgeOne or similar services.
SEO
Since this website generates no direct economic revenue, I definitely won’t spend too much energy on SEO. However, it seems that using a .com domain significantly improves indexing speed, and adding the site to Google Search Console and submitting the sitemap also helps. The site architecture itself should be quite SEO-friendly.
Copyright Notice
Unless otherwise stated, articles on this site are licensed under CC BY-NC-SA 4.0. This means you are free to share and adapt the work, provided you give appropriate credit, use it for non-commercial purposes, and distribute it under the same license. The underlying source code (Codebase) of the blog and code snippets within the content are governed by the MIT License. You are welcome to Fork or perform secondary development on GitHub.