Using foliofield
Prepare
- Node.js ≥ 22 (declared in
engines) - Any package manager — npm and pnpm both work; the repo has no workspace complexity
Three steps to run
git clone https://github.com/leanku/foliofield.git
cd foliofield
npm install && npm run dev
Open http://localhost:4321 for the cover page. Common commands:
| Command | Purpose |
|---|---|
npm run dev |
Local dev server with hot reload |
npm run build |
Build static output into dist/ |
npm run preview |
Preview the built output locally |
npm run check |
Type check via astro check |
npm test |
Run vitest tests |
Writing a post
Create a Markdown file under src/content/blog/en/ with this frontmatter:
---
title: "Post title"
description: "One-line summary, used in lists, RSS, and SEO description"
date: 2026-11-30
tags: ["tag"]
locale: en
translationKey: my-post
draft: false
---
Two things to know:
- Pairing is done via
translationKey. Put the Chinese version undersrc/content/blog/zh/withlocale: zhand the sametranslationKey, and the two pages will point at each other (hreflang and og:locale follow automatically). Single-language posts are fine — just skip the other side. draft: truehides a post everywhere: lists, RSS, sitemap, and llms.txt all exclude it.
The body is plain Markdown: code blocks get Shiki dual-theme highlighting, tables degrade to horizontal scroll on mobile, and no layout work is needed.
Adding a project
Projects live in src/content/projects/{zh,en}/ with three extra fields:
featured: true # whether it appears in the homepage "Work" section
order: 1 # display order
status: live # live | building | planned | archived
status renders as a state label on the page — building and planned projects are just as welcome as finished ones.
Configuration
Almost everything lives in src/config/site.ts:
name/brand: shown in page titles, JSON-LD, and llms.txturl: your domain; RSS / sitemap / robots / llms.txt links all derive from itavatar,socials: rendered in the homepage contact blockbio.zh/bio.en: the self-introduction on the contact page, inline links supported
One level deeper: astro.config.mjs (domain and Shiki settings) and src/layouts/InkShell.astro (the design tokens of the ink system — --paper, --ink, --cinnabar; change a few lines and the site takes on another temperament).
Deploy
npm run build produces a purely static dist/ directory with no server-side dependencies — Cloudflare Pages, Vercel, Netlify, or plain Nginx all work.
After going live, check three things: /sitemap-index.xml responds, robots.txt points at your new domain, and the sitemap is submitted once to Search Console. llms.txt and RSS refresh with every build; no manual upkeep needed.