Setting up is a conversation now
Until this release, installing ./blog.sh meant copying two files and editing 277 lines of commented YAML before the first build would run. Everything was documented. That is not the same as being easy.
./setup.sh asks instead, and checks every answer as it arrives.
The questions that were quietly dangerous
Three settings could be typed wrong in a way nothing would ever tell you about.
The timezone. A typo here does not fail — Ruby falls back to UTC and says nothing — it just dates every post two hours off, forever. The wizard offers the zone from the machine's own database, unless the machine sits on UTC, which is a fact about a datacenter rather than about the person answering; then it suggests from the language you are being asked in. And it refuses anything that isn't a real zone.
The address. It lives in two places, and env.sh overrides config/site.yml. The shipped example has it pointing at example.com, so filling in only the config leaves your site calling itself example.com in its feed, its sitemap and every share preview. The wizard writes both.
The Mastodon account id. The sidebar widget wants a numeric id and people fill in an @handle, after which it shows nothing at all, quietly. The wizard verifies your token against the instance on the spot — and the id comes back out of that same call, so it can simply be offered, already correct.
Choosing one comments network switches the other off, because a config with both is one the build refuses to load.
Nothing is written until the end
Answers are collected, then both files' diffs are shown with secrets masked, and one confirmation covers the lot. Ctrl-C anywhere leaves an existing install exactly as it was.
Every question can be skipped with Enter. Re-running the wizard is how you change any of this later — and editing the files by hand keeps working exactly as it did. The two are interchangeable in both directions, because a config file you are not allowed to open is not a config file.
The diff shown is a proper LCS diff, incidentally. Comparing line for line failed in a way that mattered: adding one entry to a list shifts every line below it, so a four-line change read as everything from here to the end of the file — precisely the impression a tool asking permission to edit your config must not give.
And your comments survive
Both wizards write through a text-level editor that substitutes values into the documented template and leaves every other byte alone. Loading the YAML and dumping it back would have thrown away the two hundred lines of explanation, the commented-out blocks you uncomment when you want a widget, and the folded scalars real sites keep HTML in.
Every write is read back and verified, and restored from its backup if the file does not say what it was asked to say.
The four-line start
git clone https://github.com/DanielSnor/blog.sh.git
cd blog.sh && ./setup.sh
./blog.sh add
./blog.sh preview
The second line used to be two file copies and an editor. That is the whole change, and it is the one I should have made first.

Comments