open-context open-context
November 19, 2026 · 6 min read

Why open-context's Blog Is Plain HTML, Not React Routes

open-context's blog posts, including this one, are plain static HTML files sitting in ui/public/blog/ — not pages rendered by the React single-page app in ui/src/. Vite copies that directory into the production build untouched, so each post ships as a complete HTML document a crawler or AI answer engine can read on the first fetch, with zero JavaScript required and no dependency on the SPA's build or router.

Key takeaways

  • Every post lives at ui/public/blog/<slug>/index.html, completely outside the React Router config in ui/src/App.tsx.
  • Vite's public/ directory is copied into dist/ as-is, with no bundling, hashing, or processing — exactly what a self-contained HTML page needs.
  • Static HTML gives search crawlers and AI answer engines the full article on the initial response, skipping the separate, costlier rendering step that client-rendered pages require.
  • The React app has no /blog route at all, so a broken SPA deploy can never take the blog down, and vice versa.
  • The cost is duplication, not complexity: each post copies the same header, footer, and inline CSS block rather than sharing a component.

What "plain HTML" actually means here

Open any file under ui/public/blog/ and you'll find a complete, self-contained .html document: its own <head> with title, meta description, canonical link, Open Graph tags, and JSON-LD; its own inline <style> block; and a header, article body, and footer with no external script tags. There's a manifest.json tracking which posts exist and which topics are queued next, an index.html listing page, and a sitemap.xml with one <url> entry per post. None of it touches React.

That works because of how Vite's build treats its public directory. Per Vite's own documentation, files placed there are "served at root path / during dev, and copied to the root of the dist directory as-is" — never imported, never bundled, never given a content hash. open-context never overrides the default publicDir option in ui/vite.config.ts, so ui/public/blog/<slug>/index.html lands at dist/blog/<slug>/index.html exactly as written, which Cloudflare Pages then serves at open-context.dev/blog/<slug>/.

Why not just add a /blog route to the React app?

Nothing stops a route like <Route path="/blog/:slug" /> from existing in ui/src/App.tsx alongside /dashboard, /preferences, and the rest of the authenticated app. But that route would come with the same requirement every other route in that file has: a browser has to download the SPA's JavaScript bundle, execute it, and run React before any article text exists in the DOM. That's client-side rendering, and it's a worse default for a page whose entire job is to be read by something other than a logged-in user clicking around the dashboard.

Search engine documentation on this is consistent: Googlebot processes JavaScript pages in three separate phases — crawling, rendering, and indexing — and rendering is a distinct, resource-intensive step that can lag behind crawling or fail outright, unlike a static HTML response a crawler can read immediately. Static pages skip that step entirely. The same logic applies even more strongly to the AI answer engines and chat assistants that now cite blog content directly: many fetch raw HTML without executing JavaScript at all, so a client-rendered page can look empty to them even when a browser would eventually fill it in.

Two systems, deliberately not overlapping

Look at ui/src/App.tsx and you'll see the actual route list: /dashboard, /preferences, /conversations, /pipeline, /export, /contexts, /bubbles, /chat, /database, and /roadmap, all wrapped in the app's AuthProvider and AppProvider context. There is no /blog entry, and there doesn't need to be — the blog isn't part of the application state tree open-context already keeps in a single React Context, so routing it through the same provider stack would add dependencies for no benefit.

That separation means a bug in the SPA build — a failed npm run build, a bad dependency bump, an auth regression — has zero blast radius on the blog, and a typo fixed in a blog post never requires touching the React app, running its test suite, or waiting on its build step at all.

What this costs, and why it's worth it

The honest tradeoff is duplication. There's no shared <Header /> component, no templating engine, no markdown-to-HTML pipeline. Publishing a new post means copying the structure of an existing one — header, footer, and the full inline <style> block — and editing the content, metadata, and JSON-LD by hand, the same way this post was built from migrate-chatgpt-to-claude/index.html.

For a handful of posts published every couple of days, that's a small, visible cost. The alternative — a static site generator, a markdown pipeline, or a templating layer bolted onto the Vite build just to render a few dozen articles — is exactly the kind of premature abstraction the project avoids elsewhere: three similar HTML files beat a build-time templating system nobody else on the project needs to maintain.

Where each approach actually belongs

Lives inRendered byUsed for
ui/src/React + Vite build, client-sideThe authenticated app: dashboard, preferences, conversion pipeline
ui/public/blog/Static files, copied as-is by VitePublic, indexable content: blog posts, the listing page, the sitemap

See the whole pipeline this blog describes, source included.

Get started with open-context →

FAQ

Does open-context's blog use React at all?

No. Each blog post is a self-contained .html file under ui/public/blog/, with its own inline CSS and no JavaScript framework. React only powers the app at routes like /dashboard and /preferences.

Why not use a static site generator instead of hand-written HTML?

A generator would add a build step, a templating layer, and a new dependency for a handful of pages a month. Copying one existing post and editing the content is faster and keeps the blog dependency-free, in keeping with the project's preference for no unnecessary abstractions.

Could open-context ever add a /blog route to the React app?

It's possible, but it would trade a crawler-friendly, zero-JS page for one that depends on client-side rendering completing successfully — a worse default for content meant to be indexed and cited, not interacted with.

Does static HTML hurt design consistency with the rest of the site?

No. Each post's inline <style> block is copied from the same reference post, so the pitch-black theme, Styrene A font, and header and footer markup match the main app's Landing page exactly, even though the CSS itself isn't shared at the code level.

How does Vite know to include ui/public/blog in the production build?

Vite copies everything under its configured public directory into dist/ verbatim, with no processing, by default. Since open-context never overrides publicDir, ui/public/blog/<slug>/index.html ends up at dist/blog/<slug>/index.html untouched.