About this project

nfuwari is the source repository for Lucius7's Blog (blog.lucius7.cn), a personal site built on the Fuwari theme for Astro and deployed to GitHub Pages. Chinese and English content are kept separate. Posts live under src/content/posts/zh/ and src/content/posts/en/, each with its own lists, category and tag counts, post navigation, RSS feed and search index, and the root URL redirects to /zh/. Interface strings are in src/i18n/, About pages are per language under src/content/spec/, and translations can be matched by identical relative paths or linked by a translationKey, with the language switcher falling back to the target language's home page. Writing is Markdown-driven. A generator script (pnpm new-post zh/name or pnpm new-post en/name) creates a draft with frontmatter defaults including lang: zh_CN or lang: en; posts default to draft: true and are visible only in local development, since production builds exclude drafts. Frontmatter fields and validation are defined in src/content/config.ts. Math is supported through remark-math and rehype-katex, with styles and fonts shipped by the site. Readers get light and dark themes, categories, tags, Pagefind search, RSS and sitemap output. Site identity, theme hue, profile, navigation, social links and post license are configured in src/config.ts, while the banner image, avatar (a Tencent QQ avatar endpoint), site icon and footer registration link are also configurable there or through public/ and src/assets/. Two optional dashboard features read from the author's OJFlare public API: a sidebar widget showing the latest three accepted Codeforces/AtCoder submissions, and an AC contribution calendar on the About pages that deduplicates accepted history by problemId, uses Asia/Taipei (UTC+8) dates, and offers year and platform filters. Both share one polling loop, refresh every five minutes while the page is visible, keep previously loaded records if a refresh fails, and can be disabled in config; the blog build does not depend on the API being reachable. Tooling covers pnpm dev for a draft-inclusive preview, pnpm lint, pnpm check for Astro/Svelte/TypeScript checking, pnpm build (which also produces the Pagefind index) and pnpm preview for the built site. Test scripts exercise language routing, the MacFlare activity widget and OJFlare parsing without contacting live services. GitHub Actions runs style checks, type checks, build and deployment on updates to main, publishing to GitHub Pages, with a custom domain served through Alibaba Cloud ESA and recorded in the CNAME file. Dependabot checks npm and GitHub Actions weekly. Guides for writing, bilingual content, LaTeX, deployment and dependency review live under docs/, and the project code retains the MIT license and upstream attribution.