Astro-powered bilingual personal homepage for BeaCox. Content is written in Markdown, then rendered into a fixed profile sidebar, generated section navigation, project cards, timeline sections, CVE lists, dark/light themes, and responsive layouts.
Live: beacox.space
- Chinese and English routes:
/and/en/ - Content-driven sections from
src/content/{zh,en} - Sticky profile sidebar with generated desktop and mobile navigation
- Markdown layouts for about, prose, timeline, CVEs, and projects
- Client-side GitHub metadata refresh for project stars, language, and topics
- Dark/light theme toggle with local preference persistence
- Footer source link configured from shared profile data
Page chapters live in paired Markdown files:
src/content/zh/*.md
src/content/en/*.md
Each file starts with frontmatter:
---
title: Projects
order: 45
kind: projects
draft: false
---Frontmatter fields:
title— section heading and navigation labelorder— numeric section order; it does not need to be consecutivekind— section layout; one ofabout,prose,timeline,cves,projectsdraft— optional; set totrueto hide the sectionprojects— required only forkind: projects
Use the same filename and similar order values in both language directories.
The filename becomes the section anchor: projects.md becomes #projects.
Shared profile and interface text lives in src/i18n/locales.ts.
Each language must contain exactly one kind: about section. Paragraphs form
the intro, and blockquotes render as compact focus cards:
> ## Software Security
>
> Program analysis and vulnerability research.Use kind: prose for ordinary Markdown content. Headings, paragraphs, links,
lists, emphasis, and blockquotes are supported.
Use kind: timeline. Each level-three heading is treated as the date, and the
following paragraph is treated as the entry body:
### 2025–2027
Shanghai Jiao Tong University
**M.Eng.** in Cyberspace SecurityUse kind: cves. Each level-three heading is a vendor, followed by a Markdown
list of CVE links:
### D-Link
- [CVE-2024-7357](https://www.cve.org/CVERecord?id=CVE-2024-7357)
- [CVE-2025-4841](https://www.cve.org/CVERecord?id=CVE-2025-4841)Use kind: projects and define cards in frontmatter:
---
title: Projects
order: 45
kind: projects
projects:
- repo: BeaCox/PastePilot
logo: /projects/pastepilot.png
description: A lightweight macOS clipboard manager built for developers.
language: Swift
topics:
- clipboard
- macos-app
- swift
---Project logos live under public/, so /projects/pastepilot.png maps to
public/projects/pastepilot.png. Cards link to GitHub and refresh public repo
metadata in the browser when available.
npm install
npm run devUseful scripts:
npm run dev # start Astro dev server
npm run build # build static output into dist/
npm run preview # preview the production build locallyThe repository is configured for Vercel in vercel.json:
- Framework: Astro
- Build command:
npm run build - Output directory:
dist
Import the repository into Vercel and deploy it without additional project settings.
src/assets/ Images processed by Astro
src/components/ Page, section, and project renderers
src/config/sections.ts Markdown discovery and section sorting
src/content/ Bilingual Markdown content collections
src/i18n/ Shared locale and profile data
src/layouts/ Base HTML layout
src/pages/ Chinese and English routes
src/styles/global.css Theme, layout, and responsive styles
public/ Static assets served as-is
vercel.json Vercel build and output settings