<?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>Dirk Primbs Unprompted - WebDev</title>
    <link>https://unprompted.dirkprimbs.de/index.html</link>
    <description>Posts tagged &#x27;WebDev&#x27; on Dirk Primbs Unprompted.</description>
    <language>en-us</language>
    <lastBuildDate>Wed, 15 Jul 2026 04:00:00 GMT</lastBuildDate>
    <atom:link href="https://unprompted.dirkprimbs.de/feeds/webdev.xml" rel="self" type="application/rss+xml" />
        <item>
            <title>My blog engine is now privacy-first</title>
            <link>https://unprompted.dirkprimbs.de/posts/engine-update.html</link>
            <guid isPermaLink="true">https://unprompted.dirkprimbs.de/posts/engine-update.html</guid>
            <description>I rebuilt my blog engine to make sure that everything you see here is transparent, private, and free from third-party tracking.</description>
            <content:encoded><![CDATA[<p>A quick behind-the-scenes update on the blog engine itself. Since I launched this thing I've quietly added a bunch of features, and most of them share a theme: being transparent about how the site is made, and not leaking your data to third parties in the process.</p>
<p>I built this engine myself, with AI help, which is rather the point. So none of this is a changelog - these are choices I made on purpose. Quick tour of what changed.</p>
<h3>A real transparency label</h3>
<p>Every page now carries a small AI transparency label in the footer. It says, in plain terms, what a human did and what the AI did on this site - ideation and the actual writing are mine, the AI helps with engine development and polishing. This matches the whole spirit of the <a href="https://unprompted.dirkprimbs.de/posts/aicare.html">AICare toolkit</a> I wrote about earlier: if I'm going to use AI, I should say so, out loud, where you can see it.</p>
<h3>Automatic alt text for images</h3>
<p>Every image I drop into a post now gets a written alt text - the description a screen reader reads aloud, and the thing you see if an image fails to load. It's generated automatically at build time by a vision model, but only when I haven't written one myself. If I write my own, mine stays.</p>
<p>The point is accessibility. I was forgetting to write alt text by hand, so I made the engine refuse to forget.</p>
<h3>YouTube embeds that don't spy on you</h3>
<p>When I link a YouTube video, it now shows up as a proper playable embed instead of a plain link. But it does NOT load YouTube's player - or its cookies, or its tracking - until you actually click play. Before that it's just a thumbnail served from my side.</p>
<p>So you can read a post with a video in it and YouTube never knows you were there unless you decide to watch.</p>
<h3>Comments, powered by Mastodon</h3>
<p>The big one. Posts can now have a comment section - and it's just Mastodon.</p>
<p>When I publish something, the engine posts a toot linking to it. Any replies to that toot become the comments under the article. No comment database, no Disqus, no third-party embed watching my readers. The comments load from Mastodon only when you click a button, and I sanitize everything before it touches the page.</p>
<p>If you want to comment, you reply to the toot. Your comment lives on your own Mastodon account, on your own instance. I don't own it and can't hold it hostage. That feels like the right way round.</p>
<p>Credit where due: I adapted this approach from Carl Schwan's excellent write-up, <a href="https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/">"Adding comments to your static blog with Mastodon"</a>. I changed a fair bit to fit this engine, but the core idea is his.</p>
<h3>Smaller things</h3>
<p>Link previews: posts now generate a proper preview card when shared (the image + title + summary box you see on Mastodon, LinkedIn, etc). If a post has its own image it uses that, otherwise a default.</p>
<p>Images are now self-hosted too - anything I reference gets copied into the site instead of hotlinked, so nothing breaks or leaks later.</p>
<p>The common thread, if there is one, is that I'd rather the site be a little more work for me and a lot more transparent with you. Next thing on my list is watching to see if anyone actually replies to that first toot.</p>]]></content:encoded>
            <pubDate>Wed, 15 Jul 2026 04:00:00 GMT</pubDate>
        </item>
        <item>
            <title>Back to Static: Why I Built My Own Blog Engine (Again)</title>
            <link>https://unprompted.dirkprimbs.de/posts/hello_world.html</link>
            <guid isPermaLink="true">https://unprompted.dirkprimbs.de/posts/hello_world.html</guid>
            <description>A look at why I built a minimalist local-first static site generator powered by simple Python scripts, AI, and Markdown.</description>
            <content:encoded><![CDATA[<p>I have been around the web publishing block a few times. My very first blog engine was cobbled together back in the early days of static-only web pages, when CGI scripts were the only dynamic component you could lean on. Later, like many of us, I chased the dynamic wave. I wrote similar engines in ASP, ASP.NET, and PHP, riding the server-side scripting train for years.</p>
<p>Eventually, that road leads to WordPress. And with WordPress comes the constant toil - update loops, database bloat, plugin conflicts, and the never-ending security advisories. It gets exhausting when all you want to do is write down some thoughts about hardware, photography, or open source.</p>
<p>So, I decided to go back to my roots.</p>
<p>I wanted something dead simple, secure, and entirely under my control. For years, my writing has started its shelf life randomly in plain text files. I write and take notes in Markdown using Typora or Visual Studio Code, which is actually a surprisingly capable markdown environment. When LLMs came along and showed a natural affinity for Markdown, it felt like a fun validation of a workflow I had already been using for a decade.</p>
<h2>Why Not a Classic Static Site Generator?</h2>
<p>You might wonder why I didn't just pick up an established static site generator like Hugo, Jekyll, or Eleventy. The honest answer is that they feel way too complicated for what I am trying to do.</p>
<p>Most modern static site generators come bloated with extended toolchains, complex dependency trees, and a mountain of command-line magic just to get a basic theme running. By the time I configured their configuration files, customized the layouts, and set up a deployment workflow, I would have ended up writing a similar amount of custom automation code anyway. I didn't want to learn a massive framework's specific way of doing things just to render a folder of text files.</p>
<p>Plus, I just liked the experiment. Python and Ollama were already sitting on my system, and building this custom setup in close collaboration with Gemini was half the fun. It is tailored exactly to how I want to work, without any extra engineering weight.</p>
<h2>From Raw Draft to Live Post</h2>
<p>Writing a new post here feels nothing like working in a traditional CMS. I don't worry about formatting, picking categories, or fighting frontmatter syntax when I open an editor.</p>
<p>The process starts inside the <code>sources/</code> directory with a raw, messy text file. I write my notes in Typora or VS Code, often bouncing between German and English depending on whatever is in my head. I don't even add titles or dates. When I am done, I just run the publish script, which orchestrates a pipeline that turns that rough text into a live webpage.</p>
<div class="codehilite"><pre><span></span><code>[sources/draft.md] 
       │
       ▼
(Ollama / gemma4:e4b) ──► Translates, tags, and cross-links
       │
       ▼
[content/draft.md] 
       │
       ▼
(build_blog.py)       ──► Sanitizes HTML, fixes links, maps assets
       │
       ▼
[public/index.html]   ──► Syncs live via lftp
</code></pre></div>

<p>A bash script picks up the raw draft and prepares a massive prompt for a local Ollama instance running a <code>gemma4:e4b</code> model. The script feeds the AI my strict voice guidelines, a JSON list of all my existing tags, and a link manifest containing the summaries and slugs of every post I have ever published here.</p>
<p>The local model translates any German sections into clean English, formats the text with standard code blocks, selects matching tags from the existing taxonomy, and looks for natural opportunities to drop in one or two context-aware cross-links to older articles. A quick Python snippet validates that the returned YAML frontmatter is well-formed before saving the file to the <code>content/</code> folder.</p>
<p>From there, the static compiler (<code>build_blog.py</code>) handles the heavy lifting. Instead of relying on a framework, it uses standard Python tools to transform the markdown into static files. This is where a couple of custom architectural choices come in. The script runs an in-memory link pass that compares relative links against valid files in the content directory. If it finds a dead link, it heals it on the fly by stripping the broken markdown link wrapper and keeping the plain text so the site never generates a 404 error. It also scans for local images, copies them to a central assets folder, and automatically renames them using the post slug as a prefix to eliminate filename collisions.</p>
<p>The actual layout generation uses a safe rendering function to swap out variable hooks in a master HTML template. It pops the main article content out of the mapping dictionary entirely, renders the head metadata, layout attributes, and open graph tags first, and only inserts the raw article body at the very last step. This prevents broken layouts if a model-generated summary contains a stray double-quote that tries to break out of an HTML attribute.</p>
<p>Once the script finishes building the post, it regenerates the paginated index pages, updates the tag clouds, and refreshes the RSS feed. The shell script displays a quick confirmation prompt, and typing <code>y</code> triggers an automated mirror command that pushes the flat files to my web space.</p>
<h2>Hello World</h2>
<p>So, this is it - the official "Hello World" for the new setup. Every word you just read went through the exact pipeline I just described, from a chaotic text file on my laptop to a flat HTML page on a server somewhere. It feels good to have a space that just works without the overhead.</p>
<p>Now that the plumbing is sorted out, I can finally get back to what actually matters. I have a backlog of daily photography notes from around Toronto and a few hardware projects sitting on my desk that need writing up. See you in the next post.</p>]]></content:encoded>
            <pubDate>Sun, 12 Jul 2026 04:00:00 GMT</pubDate>
        </item>
</channel>
</rss>