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, author avatar, 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/avatar.pngor an absolute HTTP(S) URL. It supplies the default Open Graph and Twitter image; an article's own cover takes precedence.site.author.avataruses the same URL format for the toolbar's Home link and the generated Person metadata. It is independent ofheader.photoincontent/cv.yaml, which remains the real portrait in the homepage and CV introductions.site.author.nameis used in page titles and as the metadata/feed fallback for articles without anauthorslist.citationNameis the corresponding BibTeX name format, such asPu, Fanyi; it is used for both the fallback and a matching name in an article author list.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.
public/avatar.svg is the editable vector source for the illustrated avatar.
The toolbar and generated Person metadata use it through site.author.avatar;
the browser favicon also uses the SVG, with a PNG fallback. Export the PNG
derivatives from the same SVG: public/avatar.png is 512×512 for Open Graph and
Twitter sharing, public/favicon-32x32.png is the 32×32 favicon fallback, and
public/apple-touch-icon.png is 180×180 for Apple home-screen compatibility.
When changing the SVG, regenerate these derivatives and update the icon version
query in src/index.html to refresh cached icons. Keep public/me.avif for the
introductions.
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.