2 min read
Keeping a small site fast and easy to find
Page weight budgets, fonts, feeds, sitemaps and llms.txt. The short list of things that keep a static blog quick and discoverable.
A static site starts out fast. It stays fast if you avoid adding weight you do not need, and it gets found if you publish a few small files that machines know how to read. This post is the checklist I use.
Set a page weight budget
Decide how heavy a page is allowed to be and check it now and then. For a text blog, 100 KB for the HTML, CSS and fonts together is generous. This site inlines its CSS, uses the reader's system fonts, and ships no JavaScript of its own, so a post is about 15 KB before images.
The usual causes of a slow blog are easy to spot:
- Web fonts. Each weight and style is another file. If you want a custom font, host one variable font file yourself and preload it. Or use the system font stack and skip the download.
- Large images. Resize them before you commit them. Add
widthandheightso the page does not jump while they load, andloading="lazy"for anything below the first screen. - Third-party scripts. Analytics, embeds and chat widgets often weigh more than the rest of the page. Load the ones you keep with
asyncso they never block the text.
Make it readable without effort
Speed is not only bytes. A line length of 60 to 75 characters, a font size of at least 17 pixels and enough contrast between text and background make a page faster to read. Support dark mode with the prefers-color-scheme media query, so the site follows the reader's system setting with no toggle to build.
Publish files that machines read
A few small files do most of the work of being found:
A sitemap. sitemap.xml lists every page with its address and date. Search engines use it to find new posts sooner. Submit it once in Google Search Console and Bing Webmaster Tools.
A feed. An Atom or RSS feed at feed.xml lets readers follow the blog in a feed reader. It is still how many people keep up with small sites, and it costs nothing to generate.
Good titles and descriptions. Each page needs a unique <title> and a meta description of one or two sentences. These are what people see in search results, so write them for people.
llms.txt. This is a newer convention: a Markdown file at the root of the site that lists the pages with a short summary of each, for AI tools that read the web. Its companion, llms-full.txt, holds the full text of every page in one file. This starter writes both at every build from the finished HTML, so they never fall out of date.
Let readers ask
llms-full.txt has a second use. The Ask button on this site sends a reader's question, together with the matching parts of that file, to a language model and shows the answer with links to the posts it came from. It is one script tag loaded with async, so it does not slow the first paint, and it only fetches the text when someone opens the box.
Check it now and then
Run Lighthouse in Chrome's developer tools on your home page and one post every few months. It measures speed, accessibility, best practices and search basics, and it tells you exactly what to fix. A small static blog should score at or near 100 in all four without special tricks.