<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Farshad Momtaz's Blog</title>
    <link>https://farshadmomtaz.com/blog/</link>
    <description>Notes on software, from silicon to cloud, by Farshad Momtaz.</description>
    <language>en-us</language>
    <atom:link href="https://farshadmomtaz.com/feed.xml" rel="self" type="application/rss+xml" />
    <lastBuildDate>Fri, 20 Nov 2026 00:00:00 +0000</lastBuildDate>
    <item>
      <title>Blogging without a platform (sort of)</title>
      <link>https://farshadmomtaz.com/blog/blogging-without-a-platform/</link>
      <guid isPermaLink="true">https://farshadmomtaz.com/blog/blogging-without-a-platform/</guid>
      <pubDate>Fri, 20 Nov 2026 00:00:00 +0000</pubDate>
      <description>I've been thinking about blogging again, and the hardest part so far hasn't been the writing. It's been picking where the writing lives. WordPress? Or maybe something lighter? Or a paid option like Substack? Or the boldest idea: why use a platform at all? It sounds a little crazy, but hear me out. Write the posts as plain files, let a tool turn them into a website, and put that website anywhere you want. No database, no admin page, no plugins nagging you to update. This blog is the result. Here's how it works, and where it got annoying.</description>
      <category>Engineering</category>
      <category>Blogging</category>
      <category>Static Sites</category>
      <content:encoded><![CDATA[<p>I've been thinking about blogging again, and the hardest part so far hasn't been the writing. It's been picking where the writing lives.</p>
<p>WordPress? Or maybe something lighter? Or a paid option like Substack?</p>
<p>Or the boldest idea: why use a platform at all? It sounds a little crazy, but hear me out. Write the posts as plain files, let a tool turn them into a website, and put that website anywhere you want. No database, no admin page, no plugins nagging you to update.</p>
<p>This blog is the result. Here's how it works, and where it got annoying.</p>
<h2 id="getting-started-with-starlight" class="fw-bold mt-5 mb-3">Getting started with Starlight</h2>
<p>The tool I picked is <a href="https://starlight.astro.build/">Starlight</a>. It's built on top of <a href="https://astro.build/">Astro</a>, and its whole job is turning a folder of Markdown files into a clean, fast website.</p>
<p>Fun fact: Starlight is technically made for documentation sites, not blogs. I'm using it anyway (rules are more like guidelines). You get a sidebar, dark mode and built-in search for free, which is more than my last blog ever had.</p>
<p>If you have <a href="https://nodejs.org/">Node.js</a> installed, one command sets everything up:</p>
<pre><code class="language-bash d-block p-3 bg-body-tertiary border rounded">npm create astro@latest -- --template starlight
</code></pre>
<p>It asks a few questions, creates a project folder, and installs what it needs. Then start a local preview:</p>
<pre><code class="language-bash d-block p-3 bg-body-tertiary border rounded">cd my-blog
npm run dev
</code></pre>
<p>Open the address it prints in your terminal (usually <code>http://localhost:4321</code>) and you have a website. On your own computer, but still. A website!</p>
<p>Every post is just a Markdown file in <code>src/content/docs/</code>. The one rule: each file starts with a small header that has a title. Leave it out and the build stops and tells you exactly which file is missing one (ask me how I know).</p>
<pre><code class="language-markdown d-block p-3 bg-body-tertiary border rounded">---
title: Blogging without a platform
---

Your post goes here.
</code></pre>
<p>That's the whole system. Add a file, get a page.</p>
<p>Images work too. Put them in <code>src/assets/</code> and point to them with a normal Markdown image link, using a path relative to your post:</p>
<pre><code class="language-markdown d-block p-3 bg-body-tertiary border rounded">![The description of image goes here](../../assets/my-image.png)
</code></pre>
<p>Starlight optimizes them for you when it builds the site, so you don't have to resize anything by hand.</p>
<h3 id="making-it-look-less-like-docs" class="fw-bold mt-4 mb-2">Making it look less like docs</h3>
<p>Out of the box, Starlight looks like, well, documentation. Clean, but a little serious.</p>
<p>That's where <a href="https://starlight.astro.build/resources/themes/">themes</a> come in. They're made by the community, and there are a couple dozen of them, like Catppuccin, Dracula, Ion, Starlight Black and Starlight Rapide. A theme is just a Starlight plugin: install it with npm, add it to the plugins list in <code>astro.config.mjs</code>, and your whole site changes its look. Starlight Galaxy has that old school 2000s internet vibes.</p>
<h3 id="turning-it-into-an-actual-blog" class="fw-bold mt-4 mb-2">Turning it into an actual blog</h3>
<p>Here's the thing: so far, this is a website, not a blog. Starlight's home page is just another page (<code>src/content/docs/index.mdx</code>), and it has no idea your pages are posts with dates. No &quot;newest posts&quot; list, nothing.</p>
<p>The fix is a plugin called <a href="https://github.com/HiDeoo/starlight-blog">starlight-blog</a>, and it's the piece that makes this whole setup a blog. Install it:</p>
<pre><code class="language-bash d-block p-3 bg-body-tertiary border rounded">npm i starlight-blog
</code></pre>
<p>Then add it to the plugins list in <code>astro.config.mjs</code>, and follow its <a href="https://starlight-blog-docs.vercel.app/getting-started/">getting started guide</a> for one small change to <code>src/content.config.ts</code>. After that, posts go in <code>src/content/docs/blog/</code>, and each one gets a date:</p>
<pre><code class="language-markdown d-block p-3 bg-body-tertiary border rounded">---
title: Blogging without a platform
date: 2026-11-20
tags: [starlight, blogging]
---
</code></pre>
<p>That's it. You get a <code>/blog</code> page with your newest posts at the top, tag pages, and an RSS feed, all built for you. You can either set the blog as the home page or just direct people to the blog from the home page with a big button and call it a day.</p>
<p>And that's only one plugin. Starlight has a whole <a href="https://starlight.astro.build/resources/plugins/">list of plugins</a> to add features, and pretty much everything (the look, the sidebar, the components, how pages are built) can be customized and optimized way more than I'm doing here. If you want to go deeper, the <a href="https://starlight.astro.build/">Starlight website</a> is the place to poke around and see what's possible.</p>
<h2 id="writing-in-a-normal-editor" class="fw-bold mt-5 mb-3">Writing in a normal editor</h2>
<p>Okay, so Markdown is great, but writing in it can feel like writing in a terminal. Not having a fancy editor would suck.</p>
<p>But hey, you don't have to give one up. You can still write in Word, LibreOffice Writer or, if you love pain like me, LaTeX. Here's the trick:</p>
<ol>
<li>Write the post in whatever editor you like.</li>
<li>Save or export it as a PDF.</li>
<li>Give the PDF to an AI model and ask it to turn it into Markdown.</li>
<li>Drop the file into <code>src/content/docs/blog/</code>.</li>
</ol>
<p>Try a prompt like this:</p>
<blockquote class="border-start border-4 border-primary bg-body-tertiary ps-3 pe-3 py-2 my-4">
<p>Convert this PDF into an .mdx file for a Starlight site. Keep my wording exactly. Use ## for section headings, keep lists and code blocks, and start the file with a front matter block that has a title and today's date. Where it helps, use Starlight's built-in components: Aside for notes and warnings, Tabs for side-by-side options, Steps for numbered instructions, and Code or FileTree for code and folders. Import them from '@astrojs/starlight/components'.</p>
</blockquote>
<p>Asking it to keep the wording matters. Otherwise the model gets creative and &quot;improves&quot; your writing, and suddenly your blog sounds like a press release (bad Claude).</p>
<p>The components part is a nice bonus. Starlight comes with <a href="https://starlight.astro.build/components/using-components/">ready-made components</a> for things like callout boxes, tabs and step-by-step lists, so your post looks designed without you designing anything. The one catch: components need the file to end in <code>.mdx</code> instead of <code>.md</code>. If you'd rather stick with plain <code>.md</code>, simple callouts still work with this syntax:</p>
<pre><code class="language-markdown d-block p-3 bg-body-tertiary border rounded">:::tip
This shows up as a tip box.
:::
</code></pre>
<h2 id="where-it-got-annoying" class="fw-bold mt-5 mb-3">Where it got annoying</h2>
<p>It wasn't a smooth process, and it came with its own challenges. For example, AI changed my text anyway because who cares about the prompt. BUT always read the Markdown before publishing. The AI does about 95% of the boring work, and the last 5% is on you.</p>
<p>The easiest way to check it is VS Code. Open the file and press <code>Ctrl+Shift+V</code> (<code>Cmd+Shift+V</code> on a Mac), or <code>Ctrl+K</code> then <code>V</code> to open the preview side by side. You see the formatted version right next to the raw text, so a broken heading or a weird list jumps out right away.</p>
<p>One heads-up: VS Code's preview doesn't know about Starlight's components or <code>:::</code> callouts, so those show up as plain text there. For the real thing, run <code>npm run dev</code> and look at the page in your browser.</p>
<h2 id="deploying-it-anywhere" class="fw-bold mt-5 mb-3">Deploying it anywhere</h2>
<p>This is my favorite part. When you're ready to publish, run:</p>
<pre><code class="language-bash d-block p-3 bg-body-tertiary border rounded">npm run build
</code></pre>
<p>Starlight turns your whole site into plain HTML, CSS and JavaScript in a folder called <code>dist/</code>. No server code, no database. Just files (the stuff browsers actually read, in not-nerd).</p>
<p>Which means you can put that folder pretty much anywhere:</p>
<ul>
<li><strong>Copy it to any web host.</strong> Anything that can serve files can serve your blog.</li>
<li><strong>Host it for free.</strong> <a href="https://docs.digitalocean.com/products/app-platform/details/pricing/">DigitalOcean's App Platform</a> hosts up to three static sites for free (with 1 GiB of outbound data for each one). Point it at your project on GitHub, set the build command to <code>npm run build</code> and the output folder to <code>dist</code>, and it rebuilds the site every time you push.</li>
<li><strong>Move whenever you want.</strong> If you ever outgrow a host, you just copy the folder somewhere else. No export button, no migration plugin.</li>
</ul>
<p>One small thing: if the site lives in a subfolder instead of at the root of a domain, set the <code>base</code> option in <code>astro.config.mjs</code> so the links still work.</p>
<h2 id="its-not-all-sunshine-and-rainbows" class="fw-bold mt-5 mb-3">It's not all sunshine and rainbows</h2>
<p>I'd be lying if I said this beats WordPress at everything. Here are the real downsides:</p>
<ul>
<li><strong>You republish everything, every time.</strong> Fix one typo and you rebuild and redeploy the whole site. If your host builds from GitHub it's just a push, but there's no &quot;Update&quot; button.</li>
<li><strong>No admin page.</strong> You can't log in from your phone and fix something on the go. Every change happens in files, on a computer.</li>
<li><strong>No media manager.</strong> There's no library to upload, search and reuse images. You name them, organize them and keep track of them yourself (and future you will not remember what <code>image-final-2.png</code> was).</li>
<li><strong>Fewer features out of the box.</strong> No comments, no scheduled posts, no newsletter signup, no built-in stats, and no plugin marketplace with a button for everything. And since Starlight is a docs tool, even the list of posts with dates only shows up once you add the blog plugin.</li>
<li><strong>You need to be a little technical.</strong> Node.js, a terminal, maybe Git. Not hard, but not zero.</li>
</ul>
<p>If you just want to write and never touch a terminal, WordPress is probably still the better pick.</p>
<h2 id="so-was-it-worth-it" class="fw-bold mt-5 mb-3">So, was it worth it?</h2>
<p>For me, it's worth it. No more admin panels! No need for updating or maintaining a software stack! Just build a static website and deploy.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>