<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Rimvydas Bingelis · dev blog</title>
    <link>https://rimvydas.dev/</link>
    <atom:link href="https://rimvydas.dev/rss.xml" rel="self" type="application/rss+xml" />
    <description>Rimvydas Bingelis is a software engineer in Vilnius building EdgeRules, a Rust + WebAssembly business rules engine, its visual modeller, and local-first apps such as AskBudget.</description>
    <language>en</language>
    <lastBuildDate>Thu, 26 Nov 2026 08:00:00 GMT</lastBuildDate>
    <item>
      <title>How this site is built</title>
      <link>https://rimvydas.dev/blog/how-this-site-is-built/</link>
      <guid isPermaLink="true">https://rimvydas.dev/blog/how-this-site-is-built/</guid>
      <pubDate>Thu, 26 Nov 2026 08:00:00 GMT</pubDate>
      <description>A static dev blog with no framework in the browser, a strict CSP, and scroll animations written in plain CSS.</description>
      <content:encoded><![CDATA[<p>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.</p>
<h2 id="one-page-written-as-html"><a class="anchor" href="#one-page-written-as-html" aria-hidden="true" tabindex="-1">#</a>One page, written as HTML</h2>
<p>The whole site is one file, <code>src/site.tsx</code>. 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:</p>
<figure class="codeblock"><figcaption>tsx</figcaption><pre tabindex="0"><code>&lt;Footer&gt;
  &lt;Contact title=&quot;Contacts&quot;&gt;
    &lt;p&gt;The quickest way to reach me is LinkedIn.&lt;/p&gt;
    &lt;SocialLinks links={site.links} /&gt;
  &lt;/Contact&gt;
  &lt;Copyright&gt;© {year} · Rimvydas B.&lt;/Copyright&gt;
&lt;/Footer&gt;</code></pre></figure>
<p>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:</p>
<figure class="codeblock"><figcaption>yaml</figcaption><pre tabindex="0"><code>---
title: How this site is built
date: 2026-11-26
description: A static dev blog with no framework in the browser.
---</code></pre></figure>
<p>A post with <code>draft: true</code> shows up in the list as a draft, but gets no page and no RSS entry until I publish it.</p>
<h2 id="no-framework-in-the-browser"><a class="anchor" href="#no-framework-in-the-browser" aria-hidden="true" tabindex="-1">#</a>No framework in the browser</h2>
<p>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:</p>
<figure class="codeblock"><figcaption>edgerules</figcaption><pre tabindex="0"><code><span class="tok-keyword">ruleset</span> risk<span class="tok-punct">(</span><span class="tok-property">age</span>: number<span class="tok-punct">,</span> <span class="tok-property">income</span>: number<span class="tok-punct">)</span>: <span class="tok-punct">{</span>
  <span class="tok-property">hitPolicy</span>: <span class="tok-string">&quot;first-match&quot;</span>
  <span class="tok-property">rules</span>: <span class="tok-punct">[</span>
    <span class="tok-punct">{</span> <span class="tok-property">when</span>: <span class="tok-punct">{</span> <span class="tok-property">age</span>: <span class="tok-number">18</span><span class="tok-punct">..</span><span class="tok-number">25</span> <span class="tok-punct">},</span> <span class="tok-property">then</span>: <span class="tok-punct">{</span> <span class="tok-property">level</span>: <span class="tok-string">&quot;high&quot;</span> <span class="tok-punct">}</span> <span class="tok-punct">}</span>
    <span class="tok-punct">{</span> <span class="tok-property">when</span>: <span class="tok-punct">{</span> <span class="tok-property">age</span>: &gt; <span class="tok-number">25</span> <span class="tok-punct">},</span> <span class="tok-property">then</span>: <span class="tok-punct">{</span> <span class="tok-property">level</span>: <span class="tok-string">&quot;low&quot;</span> <span class="tok-punct">}</span> <span class="tok-punct">}</span>
  <span class="tok-punct">]</span>
<span class="tok-punct">}</span></code></pre></figure>
<h2 id="animations-without-javascript"><a class="anchor" href="#animations-without-javascript" aria-hidden="true" tabindex="-1">#</a>Animations without JavaScript</h2>
<p>The cards that slide in, the highlighter strokes behind headings and the reading-progress line under the top bar are
all CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_scroll-driven_animations">scroll-driven animations</a>.
Browsers without support, and anyone who prefers reduced motion, get a still page.</p>
<div class="table-scroll"><table>
<thead>
<tr>
<th>Piece</th>
<th>Where it lives</th>
</tr>
</thead>
<tbody><tr>
<td>Pages</td>
<td><code>src/site.tsx</code></td>
</tr>
<tr>
<td>Posts</td>
<td><code>content/blog/*.md</code></td>
</tr>
<tr>
<td>Components</td>
<td><code>src/components/</code></td>
</tr>
<tr>
<td>Security policy</td>
<td>generated <code>_headers</code> file</td>
</tr>
</tbody></table></div>
<h2 id="a-strict-security-policy"><a class="anchor" href="#a-strict-security-policy" aria-hidden="true" tabindex="-1">#</a>A strict security policy</h2>
<p>The build writes a Content Security Policy that allows only this site&#39;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.</p>
<p>You can follow new posts through <a href="https://rimvydas.dev/rss.xml">RSS</a>.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
