forming / System Design Archive

Content Infrastructure Reduction

MyBlog 已经触碰到 content-index、RSS prerender、OpenList projection、atomic write、watcher、search 和 deploy glue 等 Content Infrastructure 问题。下一阶段的正确方向不是继续扩大自研 runtime,而是在 apps/web 视觉与入口不变的前提下,吸收 Quartz、Contentlayer、Meilisearch 和 Coolify 等成熟底座来削减维护面。

Runtime MarkdownObject IndexQuartzContentlayerMeilisearchCoolifyPagefindOpenList Cold LayerAstro Presentation Shell
Inspiration

借鉴对象

  • Quartz digital garden substrate
  • Contentlayer typed content pipeline
  • Meilisearch object search
  • Coolify deployment platform
  • Astro Paper as content-layer reference
Rejected

拒绝的方案

  • 继续把 content-index.json 膨胀成 JSON database,因为它已经承担了 projection、RSS、search 和 runtime payload 的过多责任。
  • 继续新增 watcher、RSS 竞态补丁、build sync、deploy wrapper 或 runtime governance 文件来掩盖成熟系统本该接管的问题。
  • 把 OpenList 当 runtime build 或 projection authority,因为它只能承担 public browse、blob backend、cold archive 和 content address space。
  • 把 Quartz、Contentlayer、Meilisearch 或 Coolify 写成 active 能力;没有 clone/install/start/readiness evidence 时,它们只能是 candidate 或 target。
Runtime

运行方式

  • 当前 active 线仍是 Runtime MarkdownObject:public-data/runtime/content-index.json 与 /srv/myblog/site/runtime/content-index.json 是公开文章投影索引,但只允许作为过渡 projection。
  • Quartz 是 embedded substrate candidate:优先研究 jackyzha0/quartz 的 Obsidian Markdown pipeline、wikilink、backlink、graph、RSS、search、SPA/incremental、component registry、plugin protocol 和 content index 思路,但不替换 apps/web 生产前端。
  • Contentlayer 是 Astro-native candidate:保留 Astro UI shell 时,应优先评估 typed content schema、parsing、watch 和 projection 能否替换自写 build-runtime-content-index glue。
  • Meilisearch 是 target-not-deployed search runtime:动态对象、OpenList 文件索引、KnowledgeObject snapshot、Directus metadata 和 Immich import 不得继续塞进 giant runtime JSON;Pagefind 在上线前只叫静态 archive 搜索。
  • Coolify 是 candidate-not-deployed deployment platform:当前仍用 npm run deploy:site;后续评估 Git deploy、env、healthcheck、rollback、cron 和 compose 接管手写 SSH / PowerShell quoting / smoke glue。
  • OpenList 边界保持不变:/Obsidian 是 Linux hot mirror 的 public access identity,/腾讯云COS 与 /夸克网盘 是 cold/blob backend,不参与数据库、Pagefind、Astro dist、Syncthing hot mirror、node_modules 或 runtime build。
Tradeoff

取舍

  • 评估成熟底座会暂时慢于继续 patch 当前脚本,但能避免长期陷入 build race、cache invalidation、projection consistency 和 deploy drift。
  • Quartz / Contentlayer 可能要求调整现有 MarkdownObject schema,但比继续维护自研 Markdown compiler、graph、RSS 和 search glue 更可控。
  • Meilisearch 会引入服务运维,但能把搜索从 34MB+ runtime JSON 和 Pagefind 静态边界中拆出来。
  • Coolify 会改变部署流程,因此必须先保留 npm run deploy:site 作为 active fallback,等 readiness evidence 充足再切换。
Future Direction

后续方向

  • 写 Quartz/Contentlayer 对比 spike:输入 /home/vault/Obsidian/docs,输出 MarkdownObject 或等价 typed document,验证 wikilink、backlink、RSS、graph 和 search 能力。
  • 写 Meilisearch readiness plan:schema、index source、secret、backup、healthcheck、rollback 和 Pagefind fallback。
  • 写 Coolify readiness plan:GitHub deploy、env、healthcheck、rollback、cron、compose 和当前 Nginx / systemd 边界。
  • 把 runtime index 限定为 projection snapshot;搜索、部署、媒体库、CMS 和文件同步优先交给成熟服务。