Building a Static Site Without a Framework
BoltQuickTools serves about 120 tool pages as plain HTML with no JavaScript framework on the page. No React, no Vue, no bundled application shell. This post describes that structure, using what you can see in the pages themselves, along with where it stops being a good idea.
Why skip a framework for tool pages
A framework earns its cost when many components share state and a user works in one page for a long session. A typical tool page has none of that. A JSON formatter has an input, an output, and a few buttons. A QR code generator has an input and a canvas. Component composition has little to offer there, and any framework runtime is downloaded on every first visit.
If you are deciding this for your own project, measure instead of assuming: build one representative page both ways and compare what the browser actually downloads.
The single-file pattern
Each tool page is one HTML file containing:
- The
<head>with meta tags, canonical URL, structured data, and Open Graph tags. - A link to the shared
/assets/style.css. - A small inline
<style>block for tool-specific CSS. - The navigation and tool markup.
- An inline
<script>block with the tool logic in plain JavaScript. - The footer and the shared consent script.
Measured from the files in the site at the time of this update, tool pages range from about 11 KB to 70 KB of HTML, with a median around 27 KB. Gzipped, that is about 3 KB to 15 KB, with a median near 7.5 KB. Those figures cover only the HTML document. They do not include the shared stylesheet, web fonts, analytics, or ads.
What is shared
The stylesheet is one file of about 780 lines (18 KB) that uses CSS custom properties for theming. Three small scripts in /assets/ are shared and loaded with plain <script> tags: cookie-consent.js, i18n.js, and randomizer.js.
"No framework" does not mean "no libraries". Heavy jobs still use one. The site includes local copies of pdf-lib and qr-code-styling, and two tools load a library from a CDN: the bcrypt generator (bcrypt.js from cdnjs) and the OCR tool (Tesseract.js from jsDelivr). Keeping a library on the few pages that need it means the other pages do not pay for it.
Templating without a framework
Writing the same navigation into 120 files by hand is a maintenance problem. The usual fix is a small script that reads a manifest and generates the parts that are derived from the list of tools, such as the homepage grid, category pages, and sitemap. The tool logic stays hand-written, since a script cannot generate it. A manifest entry can be as simple as this:
tools:
- slug: json-formatter
name: JSON Formatter
category: code-tools
description: Format, beautify, minify, validate JSON
keywords: [json, format, validate, beautify, minify]
This split follows how often things change. The site's navigation and categories change whenever a tool is added; the code inside an existing tool usually does not.
What you give up
Without a preprocessor you lose Sass-style nesting conveniences and utility-class systems. Without a bundler you lose tree shaking, imports across files, and any build-time checks. In exchange, the file you write is the file the browser receives, so there are no source maps to set up and no difference between debug and production output.
Shared code needs a per-case decision. A helper used by two tools can be copied or moved to a shared file. A shared file adds a request; a copy adds a place to forget to fix a bug.
Where this falls down
1. Cross-device state
The homepage's "recently used tools" list lives in localStorage, which works on one device. Syncing it across devices would require a backend and accounts, which is a different kind of site.
2. Complex shared UI
Copying markup is fine for a nav and a footer. A complex form repeated across twenty pages would need a real templating step or components.
3. Interactive state
The game randomizers have a small state machine: idle, rolling, and showing a result, plus undo. That is manageable in plain JavaScript with explicit state, and eight tools share it through randomizer.js. A site where most pages need this kind of logic would benefit from a framework's structure.
Problems to plan for
- Broken links. Without a build pipeline nothing checks internal links for you, so add a script that does.
- Inline code and CSP. Inline scripts and styles make a strict Content-Security-Policy harder, because you need hashes or nonces for each page.
- Third-party weight. Lighthouse results on a page like this depend heavily on what you load from others. The site's own HTML is small, but ad and analytics scripts are outside its control.
- Translation. Language switching on this site uses the Google Translate widget, which is quick to add but gives machine translation and loads a script from Google. Statically generated translations would be more work and more accurate.
- Consent. Sites running personalized ads in regulated regions need a consent flow that meets ad-network requirements, so check those before you build your own.
When to use this approach
It fits sites with shallow interaction on each page: small tools, documentation, portfolios. It fits poorly when pages share complex state or when a team relies on the tooling a framework provides. The test is whether the framework would solve a problem you actually have.