Blog module
An MDX-backed blog: routes, drafts, tags, and SEO registration, all self-contained so the module can be removed without touching unrelated code.
Touch-points
Section titled “Touch-points”apps/web/vite.config.ts—@mdx-js/rollupplugin (compiles.mdxpost bodies withremark-gfm,remark-frontmatter,rehype-slug) and theblogFrontmatterPluginvirtual module (virtual:blog-frontmatter) that readscontent/blog/*.mdxfrontmatter withgray-matterat dev/build time.apps/web/src/App.tsx— imports./modules/blogand mounts the/blog,/blog/:slug,/draft/:slug, and/tags/:tagroutes insideLayout.apps/web/src/components/Layout.tsx— the “Blog” nav link.apps/web/src/seo.config.ts— untouched directly; the module calls the existingregisterRoutes()contribution hook (fromapps/web/src/modules/blog/index.ts) to add the/bloglisting route and one entry per published post.apps/web/src/vite-env.d.ts—*.mdxmodule type declaration.apps/web/scripts/lib/blog-content.mjs— readscontent/blog/*.mdxfrontmatter off disk for the build scripts below (they run under plainnodeand can’t use the Vite virtual module).apps/web/scripts/prerender.mjs,generate-og.mjs,generate-sitemap.mjs,generate-worker-routes.mjs— each composesstaticRouteswithbuildBlogRoutes(loadPublishedBlogEntries(...))so posts get prerendered HTML, OG cards, sitemap entries, and worker routes. Removing the module means deleting those two imports and the[...staticRoutes, ...blogRoutes]line from each script.apps/web/src/modules/blog/— all module code (loader, pages, route registration).content/blog/— the MDX post source files, at the repo root (outsideapps/web).
Removal steps
Section titled “Removal steps”- Delete
apps/web/src/modules/blog/andcontent/blog/. - Remove blog’s entries from
apps/web/src/modules.config.tsx: the/blog,/blog/:slug,/draft/:slug,/tags/:tagroutes frommoduleRoutes, the/blogentry frommoduleNavLinks, and the now-unused import. - In
apps/web/vite.config.ts, remove themdx()plugin entry, itsremark-gfm/remark-frontmatter/rehype-slugimports, and theblogFrontmatterPluginfunction plus its entry in thepluginsarray. - Delete
apps/web/src/vite-env.d.ts(or just its*.mdxmodule declaration, if the file has picked up other unrelated content by then). - In
apps/web/scripts/prerender.mjs,generate-og.mjs,generate-sitemap.mjs, andgenerate-worker-routes.mjs, remove theloadPublishedBlogEntries/buildBlogRoutesimports and collapse[...staticRoutes, ...blogRoutes]back tostaticRoutes. Deleteapps/web/scripts/lib/blog-content.mjs. - Remove the now-unused dependencies from
apps/web/package.json:@mdx-js/rollup,remark-gfm,remark-frontmatter,rehype-slug,gray-matter. Runpnpm installafterwards. - Delete this page (
apps/docs/src/content/docs/modules/blog.md) and the links to it from the modules index and the new-project checklist — a broken internal link fails the docs build. - Run
pnpm checkto confirm the sitemap/registry tests and the rest of the suite are still green with the module gone.
Feeds and search
Section titled “Feeds and search”PT-10 added RSS/Atom feed generation (apps/web/scripts/generate-feeds.mjs) and a
Pagefind-powered search UI (apps/web/src/components/Search.tsx) as part of the
blog module’s build/runtime story, but neither is blog-specific:
generate-feeds.mjsreadscontent/blog/*.mdxviascripts/lib/blog-content.mjsand only produces entries from that directory. If the blog module is removed per the steps above,feed.xml/atom.xmlwould be empty-but-valid feeds — removegenerate-feeds.mjsfromapps/web/package.json’sbuildscript and the autodiscovery<link rel="alternate" ...>tags inpackages/shared/src/head-tags.tstoo, unless another content source is later wired into feed generation.- Pagefind indexes whatever HTML ends up in
apps/web/distat build time, not just blog content. If the project still has other prerendered/indexed pages (e.g. the home page) after blog is removed, keeppagefind --site distin the build script and keepSearchmounted inLayout.tsx— search isn’t hard-required on the blog module. Only drop the Pagefind build step andSearchcomponent if the project ends up with no indexable content at all.