Introduction to WHK Blog
Relevant source files
The following files were used as context for generating this wiki page:
The WHK Blog is a systematic knowledge repository focused on high school science curriculum (WHK), specifically mathematics, physics, chemistry, and biology. Inspired by technical wikis like CTF Wiki and OI Wiki, it provides structured notes, derivations of scientific laws, and AI-assisted content generation. The project utilizes a modern static site generation (SSG) stack combined with custom automation scripts to maintain high typographical and technical standards.
Sources: README.md:10-18, project.json:3-5
Core Architecture and Technology Stack
The WHK Blog is built as a static site that leverages a Python-based core with Node.js automation utilities. It has recently migrated from MkDocs/Properdocs to a Pandoc-based workflow using the RainPPR/mkpandocs framework.
Technical Components
| Component | Technology | Description |
|---|---|---|
| SSG Framework | MkDocs + Material for MkDocs | Primary engine for rendering the static site. |
| Mathematics/Science | KaTeX SSR | Server-side rendering for formulas, supporting mhchem. |
| Package Management | uv (Python), npm (Node.js) | Dual-stack dependency management. |
| Deployment | GitHub Pages / Cloudflare Pages | Automated CI/CD deployment pipelines. |
| PDF Export | Puppeteer + LaTeX | Converts web content into indexed PDF documents. |
Sources: README.md:21-72, pyproject.toml:1-17
Knowledge Hierarchy
The content is organized into a directory-based hierarchy:
docs/science/: Core science subjects (Math, Physics, Chemistry, Biology).docs/cultural/: Liberal arts subjects (Language, History, etc.).docs/blog/: AI-assisted blog posts.docs/home/: Documentation guidelines and project roadmaps.
Sources: README.md:38-48
AI-Assisted Workflow and Automation
The project integrates advanced AI workflows to maintain content quality and generate metadata. These are categorized into "Skills" used by AI agents or developers.
Content Generation and Review Flow
The following diagram illustrates the lifecycle of a document from integration to final review:
The workflow ensures that new notes from dev/supplement are organically merged into the existing knowledge base while maintaining strict formatting rules.
Sources: scripts/workflows/supplement-integration-v2.md:10-40, AGENTS.md:7-40
Metadata Management
The generate_frontmatter.js script automates SEO and categorization using Large Language Models (LLMs). It processes files to extract:
- SEO Creative Titles: 22±3 Chinese characters.
- Descriptions: Technical summaries of 100-200 characters.
- Atomic Tags: Multi-dimensional tagging covering discipline, core concepts, and application scenarios.
Sources: scripts/frontmatter/generate_frontmatter.js:142-178
Quality Assurance and Typography
The WHK Blog enforces rigorous typographical standards to ensure readability, especially for complex scientific formulas.
Typography Rules
- Spacing: Mandatory spaces between Chinese/English and Chinese/Numbers.
- Punctuation: Full-width Chinese punctuation marks; half-width characters for numbers.
- Structure: Single H1 header per document; max H3 depth for TOC.
- Math: Formula blocks must be separated from text by empty lines.
Sources: README.md:120-130, REVIEW.md:36-46
AI Review Agent (Review Skill)
The project includes a review.js tool that functions as a Markdown expert. It performs:
- Linting: Executes
node scripts/review/review.js lintto check for formatting errors. - Auto-correction: Fixes common typos and spacing issues.
- Semantic Check: Verifies mathematical logic and formula accuracy through deep content understanding.
Sources: AGENTS.md:42-56, REVIEW.md:7-20
Project Operations
Development Commands
| Command | Description |
|---|---|
make serve | Starts a local Docker-based preview server. |
make build | Builds the final static site. |
make export | Generates PDF releases via Puppeteer. |
node scripts/skills/read/dir_h1.js | Scans the directory for H1 titles and metadata. |
Sources: README.md:100-110, scripts/skills/read/SKILL.md:13-20
CI/CD Pipeline Structure
The repository uses two primary GitHub Actions workflows:
Sources: README.md:144-160
Conclusion
The WHK Blog is a technically sophisticated educational repository that blends traditional scientific documentation with modern software engineering practices. By utilizing AI-assisted reviewing, server-side math rendering, and automated integration workflows, it provides a high-quality, searchable, and printable knowledge base for high school science subjects.
Sources: README.md:175-185