infraphysics//content pipeline
The content pipeline is the full path a markdown file takes on this site, from the disk to rendered content in the browser.
The content pipeline is the full path a markdown file takes on this site, from the disk to rendered content in the browser.
1A .md file on disk2Run npm run build3The compilermarked, Shiki, custom syntax preprocessors4Write public/wikinotes/{uid}.jsonpre-rendered HTML and metadata5Vite bundles the React SPA into dist/6The browser loads the SPA shellCSR, a single index.html7The user navigates to a wikinote8Fetch /wikinotes/{uid}.jsonon demand9React injects the pre-rendered HTML into the DOM
The compiler runs at build time. The browser never parses markdown. It receives finished HTML inside a JSON envelope.
The site is client-rendered (rendering) and the SPA index loads eagerly. Wikinote content loads on demand, only when the user opens a specific note. This keeps initial load fast (the index is metadata only, about 50 KB for more than 500 notes).
Vite handles two separate concerns: bundling the React app into dist/, and serving files in dev mode with HMR so changes appear instantly without a full page reload.
The pipeline order matters: custom syntax is resolved before marked runs (so HTML spans survive the markdown parser), wiki-links are injected after all HTML is generated.