Common site settings live in configs/. Posts live in content/posts/, and CV content
lives in content/cv.yaml.
| File | Settings |
|---|---|
| blog.yaml | Posts per page, blog description, visibility of list excerpts/covers/dates, article BibTeX cards |
| site.yaml | Site URL and title, default description and sharing image, metadata author, citation author and key prefix, footer |
| comments.yaml | Comments toggle, Giscus repository and category, language, reactions, input position |
| redirects.yaml | Redirect destinations and titles for old paths (previously content/redirects.yaml) |
Change the page size
Edit blog.yaml:
postsPerPage: 10The value must be a positive integer. Posts are sorted by publication date,
newest first. The first page is /blog, followed by /blog/page/2,
/blog/page/3, and so on; /blog/page/1 redirects to /blog.
Each page has its own static HTML, title, and canonical link. Changing the page
size recalculates all pages during the next build. Invalid or out-of-range page
numbers show a 404 page. Search covers all published posts.
showExcerpts, showCoverImages, and showDates control the archive list.
Excerpts are generated from the opening paragraphs and shown in up to three lines.
Post front matter may omit description; it is metadata and does not supply the
visible excerpt. Category directory entries show titles and dates without excerpts.
showCitation controls the BibTeX card at the end of each article, independently
of references cited within the article.
Other settings
site.urlis the site origin, such ashttps://pufanyi.com, without a path, query, or fragment. It is used for canonical URLs, sharing links, article citation URLs, and comment theme stylesheet URLs.site.defaultImageaccepts a site-relative path such as/me.avifor an absolute HTTP(S) URL.site.author.nameis used in page titles and metadata.citationNameuses BibTeX name formatting, such asPu, Fanyi;citationKeyPrefixsets the citation key prefix, such aspu. Edit profile and CV prose in their respective content files.- Set
comments.enabledtofalseto disable comments and prevent Giscus from loading. Keep the other fields in the file. - In
redirects.yaml,fromis a site-relative route andtois an absolute HTTP(S) destination URL. Use[]when there are no redirects.
Apply changes
These YAML files are read at build time. Field names, value types, and page-size
constraints are validated. Write booleans as unquoted true or false.
Unknown settings produce an error identifying the file and field.
pnpm start and pnpm watch regenerate these files automatically on save.
Wait for compilation, then refresh the page. Invalid edits retain the last
successful preview and report the offending field. Use pnpm generate:data
for a one-off refresh. Check, test, and build also generate content; run
pnpm build again before deploying.
The generated files under src/app/data/*-config.ts should not be edited by hand.