English | 简体中文
Source repository for Evan Zhang's technical blog, live at https://xdlkc.github.io, built with Hexo 7.3 and the custom evan theme.
- Theme & Multi-Palette System (
theme-toggle.js): Supportssystem,light(Emerald,Sepia,Ocean), anddark(Dark,Midnight) presets persisted inlocalStorageand pre-applied in<head>to minimize flash of unstyled content. - UI Language Toggle (
lang-toggle.js): Switches site navigation, section headers, and UI metadata between English and Simplified Chinese while preserving each article's original prose. - Post Audio Player & Companion Drawer (
_partial/post-audio-player.ejs,post-audio-player.js): Supportspodcast(AI audio guide) andfull(full-text read-aloud) modes with play/pause,-15s/+15sseek, playback speed control, live caption marquee, and an expandable drawer for synced transcript paragraphs and key highlights. - Sticky Active Outline & Reading Aids (
post.ejs,toc-scrollspy.js,reading-progress.js,reading-time-countdown.js): Sticky280pxdesktop outline sidebar (collapsing into a mobile<details>outline below1100pxwidth) with active-heading scrollspy, reading progress bar, and remaining-time countdown. - Developer Reading UX: Mermaid v11 diagram rendering synced with light/dark theme plus click-to-zoom, code block language labels, copy buttons, collapse toggles, line-number toggles, client-side search (
site-search.js), keyboard shortcut cheatsheet (shortcut-help.js), print styles, RSS 2.0 feed with custom XSL styling (rss.xsl), and theme-synced Utterances comments. - Homepage & News Board (
index.ejs,news.ejs): Highlights featured engineering repositories, latest articles, and curated news digest entries (news.home_limit: 5). On/news/, filter Curated, All Updates, or Hot Events by Shanghai calendar date, industry, topic, and reporting source. The board groups the feeds by day and shows the eight most common matching topics first. Filtered views can be bookmarked. Use the arrow keys in either date or source picker, Enter to select, and Escape to close.
- Node.js
20+andnpm - Python
3.10+(optional, fortools/publish_article.pyandtools/generate_audio.py)
npm install
# Local preview server at http://localhost:4000/
npx hexo server # or: npm run server
# Generate static site output into public/
npx hexo generate # or: npm run build
# Clean Hexo cache and generated files
npx hexo clean # or: npm run cleanSync a Markdown draft (and its relative local images) into source/_posts/:
./tools/publish_article.py "<path-to-markdown>" --date 2026-03-01 --slug your-slugFor example:
./tools/publish_article.py "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/lkc/Openclaws/openclaw-templates-comparison-tech-memo.md" \
--date 2026-03-01 \
--slug openclaw-agent-architecture-tech-memotools/publish_article.py handles:
- Extracting the top-level
# Title(or--titleoverride) and stripping existing front-matter. - Writing
source/_posts/<slug>.mdwith normalized Hexo front-matter while preserving heading structure. - Copying relative local images into
source/uploads/<slug>/and rewriting Markdown image paths to/uploads/<slug>/<filename>. - Optionally generating MiniMax audio narration (
--with-audio,--audio-mode podcast|full,--voice-id ...) and optionally committing/pushing (--commit,--push).
After syncing, regenerate the static site with npx hexo generate.
Generate audio.mp3, audio-script.txt, and audio-meta.json under source/uploads/<slug>/ using MiniMax APIs (MINIMAX_API_KEY or MINIMAX_TOKEN in environment or .env):
npm run audio:generate -- source/_posts/your-slug.mdSupports --mode podcast|full, --voice-id, --tts-model, --llm-model, --speed, --regenerate-script, and --force.
node tools/aihot-sync.js(scheduled via .github/workflows/sync-aihot-news.yml, Node.js24+): Reuses vendored DB-free AIHOT modules in vendor/aihot/ (content/sanitize.ts,lib/page-content.ts,industry/selection.ts,industry/prompts/) with@mozilla/readability+linkedom+cheerio+sanitize-htmlto fetch multi-kind sources (rss/atom/json/web) across configurable industries (AI,工程与开源,金融与政策), extract full webpage article bodies, apply tiered selection thresholds (T1 >= 60,T2 >= 76), cluster hot events (source/_data/news-hot.json), generate answer-first Chinese summaries and optional full-body Chinese translations via an OpenAI-compatible LLM (default: GLM domestic token planhttps://open.bigmodel.cn/api/coding/paas/v4withglm-5.3-flash; configureAIHOT_LLM_API_KEYorGLM_API_KEY, optionalAIHOT_LLM_BASE_URLandAIHOT_LLM_MODEL), and merge intosource/_data/news.json. Supports--dry-run,--no-llm,--backfill-content,--rebuild-hot,--industry=...,--kind=...,--hours=72, and--max-new=15.- The curator evaluates candidates in industry rotation, prioritizing T1 sources and then publication time within each industry. At the default 150-item cap it reserves up to 30 available stories per industry, then fills remaining places with the newest stories. The macOS runner keeps its checkout in
tmp/news-sync-worktreeand its source polling state intmp/news-sync-state.json. node tools/add-benchmark.js --id=<slug> --name="<Title>" --category="<Category>" --unit="%": Scaffolds a declarative benchmark JSON file undersource/_data/benchmarks/that scripts/models.js automatically discovers and aggregates into/models/(5-domain difficulty-calibrated leaderboard, Pricing & Context view, Pareto Value Frontier chart,¥ / $currency toggle, and static/models/<slug>/detail pages linked to/news/).node tools/sync-benchmarks.js(scheduled daily via .github/workflows/sync-benchmarks.yml): Syncs live public feeds (SWE-bench Verified,LiveCodeBench) and OpenRouter live API pricing & context windows intosource/_data/models-catalog.json. Supports--dry-runand--bench=swe-bench-verified,livecodebench,openrouter-catalog.npm run news:digest(tools/generate-news-digest.js): Generates daily digest posts fromsource/_data/news.json.tools/update-news-hourly.js: Fetches domestic and international feeds intosource/_data/news.jsonwith URL/title deduplication.
The tests/ directory (200 test files) covers layout invariants, TOC scrollspy, audio player controls, theme/language toggles, RSS generation, and UI interactions using both Jest and Node's built-in node:test runner:
# Run Jest suite (configured in package.json)
npm test
# Run Node built-in test runner suites (e.g. layout and UI checks)
node --test tests/article-layout.test.js tests/ui/*.test.js- _config.yml: Primary Hexo site configuration (
url,theme: evan, Utterances comments, RSS feed) - DEV.md: Theme CSS notes (code block container styling and responsive table rules)
source/_posts/: Published Markdown postssource/uploads/: Post image and audio assetssource/_data/: Structured site data (includingnews.jsonandaihot-sources.json)themes/evan/: Custom Hexo theme (layout/,source/css/,source/js/, themes/evan/_config.yml)scripts/: Hexo build helpers, filters, RSS enhancers, search index, and sitemap generatorstools/: Publishing, audio narration, and news automation scripts (publish_article.py, generate_audio.py, auto_generate_audio.py, aihot-sync.js, generate-news-digest.js, update-news-hourly.js)tests/: Automated layout, UI, RSS, and regression test suitesvideo/: Companion Remotion project (video/README.md)- .github/workflows/deploy.yml & .github/workflows/sync-aihot-news.yml: GitHub Pages build/deploy and scheduled AIHOT news curation workflows
Pushing to master or main (or triggering workflow_dispatch) runs .github/workflows/deploy.yml:
- When
MINIMAX_API_KEYis configured in GitHub Actions Secrets, tools/auto_generate_audio.py inspects newly added or modified posts undersource/_posts/(skippingtest-*,news-midday-summary-*, posts that already defineaudio, or posts withskip_audio: true), generates podcast narration assets, and commits them back to the branch. You can also target a single post manually viaworkflow_dispatchinputs (postandforce_audio). - Installs npm dependencies on Node.js 20, builds
./publicvianpx hexo generate, and deploys directly to GitHub Pages.