How this site is built
A static dev blog with no framework in the browser, a strict CSP, and scroll animations written in plain CSS.
This site is where I write about the things I build after hours. It is also a small project in itself, so here is how it works.
One page, written as HTML
The whole site is one file, src/site.tsx. It reads like HTML, with a few components that hide the markup details:
classes, anchors, accessibility attributes and SEO tags. The footer, for example, is written just as it appears:
<Footer>
<Contact title="Contacts">
<p>The quickest way to reach me is LinkedIn.</p>
<SocialLinks links={site.links} />
</Contact>
<Copyright>© {year} · Rimvydas B.</Copyright>
</Footer>The JSX is not React. A runtime of about 150 lines turns it into escaped HTML strings at build time, and the components are type-checked, so a typo fails the build instead of shipping a broken page. Posts like this one are Markdown files with a few lines of front matter:
---
title: How this site is built
date: 2026-11-26
description: A static dev blog with no framework in the browser.
---A post with draft: true shows up in the list as a draft, but gets no page and no RSS entry until I publish it.
No framework in the browser
Vite renders every page at build time. The browser gets HTML, one stylesheet and about 1 KB of script for the theme toggle. Code samples are highlighted during the build, too, so no highlighter ships to the browser:
ruleset risk(age: number, income: number): {
hitPolicy: "first-match"
rules: [
{ when: { age: 18..25 }, then: { level: "high" } }
{ when: { age: > 25 }, then: { level: "low" } }
]
}Animations without JavaScript
The cards that slide in, the highlighter strokes behind headings and the reading-progress line under the top bar are all CSS scroll-driven animations. Browsers without support, and anyone who prefers reduced motion, get a still page.
| Piece | Where it lives |
|---|---|
| Pages | src/site.tsx |
| Posts | content/blog/*.md |
| Components | src/components/ |
| Security policy | generated _headers file |
A strict security policy
The build writes a Content Security Policy that allows only this site's own files. The two small inline scripts are allowed by their SHA-256 hashes, computed from the built pages, so the policy can never drift out of sync with the HTML.
You can follow new posts through RSS.