本文由 AI 分析生成
建立時間: 2026-03-28 來源: https://booth.dev/blog/2024/11/04/how-does-this-blog-work
Summary
Oliver Booth describes the technical architecture of his personal blog site: an ASP.NET Core app (source available) that renders Markdown with Markdig, serves IL/CIL syntax highlighting via PrismJS (297 languages vs HighlightJS’s 192), and maintains backwards-compatible URLs from the old WordPress blog via nginx 301 redirects.
Oliver Booth 描述了其個人部落格的技術架構:一個使用 Markdig 渲染 Markdown 的 ASP.NET Core 應用(源碼可用),通過 PrismJS 提供 IL/CIL 語法高亮,並通過 nginx 301 重定向保持與舊 WordPress 部落格的向後兼容 URL。
Key Points
- Tech stack: ASP.NET Core app, source available at git.booth.dev
- Markdown rendering: Markdig (CommonMark compliant, extensible for .NET)
- WordPress → custom site migration: automated regex to strip WordPress boilerplate and translate HTML to Markdown
- Backwards compatibility: nginx 301 redirect from blog.oliverbooth.dev to booth.dev/blog (preserving all old permalink paths)
- Syntax highlighting: PrismJS over HighlightJS for IL/CIL support (needed for .NET IL assembly posts)
- Motivation: WordPress HTML output littered with
<!-- wp:paragraph -->boilerplate; WYSIWYG saves actual HTML not clean Markdown
Insights
The backwards compatibility decision (nginx 301 for every old URL) reflects a serious commitment to link permanence — many bloggers don’t bother and break years of accumulated inbound links. The IL syntax highlighting need is a niche but legitimate requirement that drove the PrismJS choice; this illustrates how even “simple” blog decisions can be driven by specific technical content requirements. The ASP.NET Core choice for a personal blog is unusual (most developers would reach for Hugo/Jekyll/Astro), but gives full control for custom extensions.
Connections
Raw Excerpt
It was of utmost priority to ensure that those links remain valid indefinitely. I want my blog system to support Markdown. That way, I can write my posts in Obsidian or Notion and it should look more or less the same.