Kral Publishing System 项目预览

Overview

What
用一份源码生成博客、技术档案、项目数据库和简历,并部署为静态 GitHub Pages 站点。
Why
保留 Markdown 的可维护性,同时把复杂页面的数据关系和生成逻辑集中在构建期。
Boundary
没有运行时 CMS、应用服务器或数据库;Pages 只托管生成的 HTML、CSS 和 JavaScript。
Type
Publishing system
Period
2026 — Present
Maintainer
Kral
Content
Markdown · YAML · static images
Generator
Hexo 8 · custom build-time generators
Presentation
Butterfly 5.5 · local CSS and JavaScript
Environment
Dev Container · Node 22 · pnpm
Delivery
GitHub Actions · GitHub Pages
Publishing pipeline

Architecture

01
Author workspace
Markdown · YAML · Images → Static publishing boundary

Articles · project records · static assets

02
Static publishing boundary
Hexo 8 · Custom generators

Generator: Posts · pages · taxonomy · feeds / Build extensions: Start Here · Notes · Projects · random posts

03
Persistent dependencies
Butterfly 5.5 · Static HTML · CSS · JavaScript

Presentation: Layout · theme configuration · scoped CSS / Generated output: No application server or client framework

04
Reproducible development
Dev Container · Node 22 · pnpm
05
Build and delivery
GitHub Actions · GitHub Pages

Source on main · generated artifact deployed by workflow

Local workflow

Run the publishing system

Development is container-first. The host opens the repository, while Node, pnpm and Hexo run as the non-root node user inside the Dev Container.

Preview with drafts
pnpm dev
Requirements
Git · Docker · VS Code · Dev Containers
Environment
Dev Containers: Reopen in Container
Preview
http://localhost:4000
Verification
pnpm check

Rebuild sequence

  1. Open the source workspaceDev Containers: Reopen in ContainerThe normal workspace user is node; the host does not need Node or Hexo.
  2. Preview content and draftspnpm devHexo serves the site on port 4000 and uses port 4001 for reload events.
  3. Validate the sourcepnpm checkRuns Prettier check, ESLint and a clean production build.
  4. Publish through the source branchgit push origin mainGitHub Actions builds and deploys the public artifact; generated public files are not committed.

Verification

Local preview
Drafts are included only in the local development command.
http://localhost:4000
Production artifact
Generated by pnpm build and treated as disposable output.
public/
Deployment
Build success and Pages deployment success remain separate states.
GitHub Actions
Repository map

Structure & configuration

Content, project records, theme settings and build extensions each have one visible source location. Generated public files are never the editing surface.

Key files and surfaces

Articles
source/_posts/*.md
Projects
source/_data/projects.yml
Images
source/img/
Theme
_config.butterfly.yml · source/css/custom.css
Extensions
scripts/*.js
Delivery
.github/workflows/pages.yml
ParameterSource / scopeRequirementEffect
url
Source: _config.yml
Scope: Build
Requirement · RequiredApply · RebuildCanonical site URL and generated absolute links.
timezone
Source: _config.yml
Scope: Build
Default · Asia/TokyoApply · RebuildPost timestamps and archive grouping.
runtime_date
Source: _config.butterfly.yml
Scope: Presentation
Default · 2025/12/14Apply · RebuildWebsite runtime shown in the information card.
Project records
Source: source/_data/projects.yml
Scope: Content
Requirement · RequiredApply · RebuildGenerates the project index, record pages and their metadata.
Project history

Evolution

2026.08 — Current
  • Rebuild
    Editable Hexo source repository is re-established

    The old generated output is replaced by a maintainable Hexo 8 and Butterfly 5.5 source base.

  • Delivery
    GitHub Pages deployment becomes reproducible

    GitHub Actions builds the source and deploys a static Pages artifact from main.

  • Archive
    Technical Notes becomes a visual, searchable archive

    Build-time data and a small client controller provide five dense browsing modes without adding an application framework.

  • Database
    Project records move to one structured data source

    A Hexo generator now produces the project index and every project detail page from shared data.

  • Active
    Content and publishing rules continue to evolve

    New articles and project records extend the same source-driven system without redesigning their UI.

Source history

Repository Activity

Commit dates show the pace of the current source rebuild. The feed links to the real Git history instead of duplicating an editorial project timeline.