just a website, yo
  • CSS 51.7%
  • Emacs Lisp 18.6%
  • Just 12.4%
  • Shell 10.8%
  • Nix 5.1%
  • Other 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
hbooth 61c0e603d0 new-post: just new-post "the title" now scaffolds a whole post
The recipe ran `emacs -q --script new-post.el`, which only DEFINES
create-new-post: emacs loaded a function, threw it away and exited 0. The command
had been doing nothing at all, quietly.

It now writes content/posts/<slug>.org with the header every post carries
(DESCRIPTION, HTML_HEAD_EXTRA with a background pattern, TITLE) and adds the
home-page link. The link is the reason the script exists: content/index.org
lists posts BY HAND, so a file dropped into content/posts/ publishes perfectly
and is reachable from nothing. Scaffolding that ships an unreachable post is
worse than no scaffolding, so the link is not optional -- and because a half
scaffold is the same bug wearing a hat, the index edit is computed BEFORE any
file is written and the post is deleted if the write afterwards fails.

The CLI is `just new-post [flags] "the title"` (--journal, --description,
--pattern, --force), with the title as whatever is left over so a quoted phrase
and bare words mean the same. M-x create-new-post still prompts.

What was wrong, all of it found by running it rather than by reading it:

  - the slug replaced ONE whitespace character at a time, so "hello  world!"
    became hello--world!.org. Now: downcase, every run of non-alphanumerics to a
    single -, ends trimmed. The trims are explicit regexps because
    (string-trim "abc-" "-") does not trim a hyphen.
  - the journal link used the stem instead of the dated filename, so every
    journal entry was linked to a file that does not exist.
  - pattern urls were built as "/static/" + the name relative to static/patterns,
    which gives /static/128/clouds1.jpg -- a 404 background on every new post.
    `just check' would have refused to publish it, which is the only reason this
    is a bug report and not an incident.
  - `^\#+END_EXPORT` matches nothing: \# is not a literal hash in an Emacs
    regexp. Both export markers now go through regexp-quote.
  - an unescaped " inside a docstring closes the docstring early and the rest of
    the line is read as code, which turned a "/static/" in a comment into
    (void-variable /static/) at runtime.
  - the list search was unbounded, so an empty journal would have taken its new
    entry from the literature list's position. It is bounded by the next
    #+BEGIN_EXPORT now.

Getting arguments from just to emacs without the shell eating them took a pass of
its own. The recipe line goes through bash, so a bare title would have had its &,
;, parentheses and apostrophes interpreted -- and "ripping & processing vinyl" is
a real title on this site, whose & backgrounds the emacs. There is no per-element
escaping in just 1.58 (no ^args, and quote() on a list quotes the whole joined
list), so the recipe passes ONE shell-quoted lump and `haze--tokens' splits it
back, which is why flags go last and why a flag's value runs to the next flag.
--help could not be handled in the script either: emacs' startup eats --help
before the script file loads, so the recipe answers it and forwards --usage.

Also `just lint`, which byte-compiles build-site.el and new-post.el and fails on
ANY compiler output. That is the only check these two files get, and the
docstring bug above is exactly the class it catches -- the compiler says
"probable '\"' without '\'' in doc string", as a warning, exit 0, so empty output
is the gate. Verified by planting the bug and watching it refuse. build-site.el's
two warnings are fixed here so the gate can be strict from the start; neither
changes the build (the navbar still renders, 173 files still pass the gate).
2026-11-02 20:50:46 -05:00
.buildkite ci: the image owns /tmp and TLS trust now; delete both workarounds 2026-09-06 19:49:18 -04:00
.firebase v1 2024-12-06 20:34:08 -05:00
assets css: one bullet asset, and a hover state that is actually visible 2026-10-27 00:55:00 -04:00
content aetheryte: the preview clips are local m4a, preload=none 2026-11-02 20:42:09 -05:00
nix nix: build the CI step image in the repo, from flake.lock 2026-09-06 19:48:09 -04:00
scripts images: the dove was painting over its own past positions 2026-10-27 01:31:53 -04:00
static aetheryte: the preview clips are local m4a, preload=none 2026-11-02 20:42:09 -05:00
.editorconfig v1 2024-12-06 20:34:08 -05:00
.envrc v1 2024-12-06 20:34:08 -05:00
.firebaserc v1 2024-12-06 20:34:08 -05:00
.gitignore ci: the justfile is the deploy; delete .buildkite/deploy.sh 2026-09-06 19:27:25 -04:00
build-site.el new-post: just new-post "the title" now scaffolds a whole post 2026-11-02 20:50:46 -05:00
firebase.json v1 2024-12-06 20:34:08 -05:00
flake.lock fix(flake): input owner casing was re-pinning nixpkgs on every nix develop 2026-09-06 19:27:25 -04:00
flake.nix build: just fmt / fmt-check, formatting CSS with oxfmt 2026-10-27 00:55:03 -04:00
haze8831.aseprite aws deploy, haze button, misc updates 2026-04-02 21:37:46 -04:00
home-head.html pagespeed: 100 on every page, in all four categories 2026-10-27 00:08:54 -04:00
justfile new-post: just new-post "the title" now scaffolds a whole post 2026-11-02 20:50:46 -05:00
literature-head.html pagespeed: 100 on every page, in all four categories 2026-10-27 00:08:54 -04:00
misc-head.html pagespeed: 100 on every page, in all four categories 2026-10-27 00:08:54 -04:00
new-post.el new-post: just new-post "the title" now scaffolds a whole post 2026-11-02 20:50:46 -05:00
PAGESPEED-GAMEPLAN.md images: thin the logo to 14 frames -- it is the LCP element 2026-10-27 01:15:56 -04:00
post-head.html pagespeed: 100 on every page, in all four categories 2026-10-27 00:08:54 -04:00
test.html v1 2024-12-06 20:34:08 -05:00