Skip to content

cat ~/blog/hello-world.md

hello, world

· 1 min read

#meta#astro#devops

Welcome to the new wrren.me. This post exists mostly to prove the pipes work, so here’s a quick tour of how the site is put together.

The stack

The site is a static Astro build. Posts are plain Markdown files in src/content/blog/, and project data is pulled from the GitHub API at build time. No database, no CMS, nothing to patch.

defmodule Hello do
  @moduledoc "Obligatory."
  def world, do: IO.puts("hello, world")
end

Publishing

Writing a post looks like this:

npm run new "my next post"     # creates a draft .md file
npm run dev                    # preview at http://localhost:4321
git add . && git commit -m "post: my next post" && git push

A GitHub Action builds the site and rsyncs it to the droplet, where nginx flips a symlink to the new release. Rollback is just pointing the symlink back.

Set draft: true in the front-matter to keep a post out of the build until it’s ready.

Things to try

  • Press </kbd> anywhere to open a shell, then type help`.
  • Click the palette switcher in the nav.
  • You know the code. ↑ ↑ ↓ ↓ ← → ← → B A.
command does
ls blog list posts
open <r> open a repo on GitHub
neofetch the important stuff

More soon.

-- EOF --