samhuri.net/Readme.md

1.6 KiB

samhuri.net

Source code for samhuri.net, powered by a Ruby static site generator.

Overview

This repository is now a single integrated Ruby project. The legacy Swift generators (gensite/ and samhuri.net/) have been removed.

  • Generator core: lib/
  • Build tasks: bake.rb
  • CLI and utilities: bin/
  • Tests: spec/
  • Content: posts/ and public/
  • Output: www/

Requirements

  • Ruby 3.4.1 (see .ruby-version)
  • Bundler
  • rbenv recommended

Setup

bin/bootstrap

Or manually:

rbenv install -s "$(cat .ruby-version)"
rbenv exec bundle install

Build And Serve

rbenv exec bundle exec bake debug   # build for http://localhost:8000
rbenv exec bundle exec bake serve   # serve www/ locally

Other targets:

rbenv exec bundle exec bake mudge
rbenv exec bundle exec bake beta
rbenv exec bundle exec bake release
rbenv exec bundle exec bake publish_beta
rbenv exec bundle exec bake publish

Draft Workflow

bin/new-draft "Post title"
bin/publish-draft public/drafts/post-title.md

Post Utilities

bin/convert-frontmatter posts/2025/11/some-post.md

Tests And Lint

rbenv exec bundle exec rspec
rbenv exec bundle exec standardrb

Or via bake:

rbenv exec bundle exec bake test
rbenv exec bundle exec bake lint

Site Generation CLI

bin/pressa SOURCE TARGET [URL]
# example
bin/pressa . www https://samhuri.net

Notes

  • bin/watch is Linux-only and requires inotifywait.
  • Deployment uses rsync to the configured mudge host paths in bake.rb and bin/publish.