<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/hugo-config.el, branch load-graph-classify-start</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-04-22T12:43:41+00:00</updated>
<entry>
<title>fix(hugo): defer browser until server ready, report crashes</title>
<updated>2026-04-22T12:43:41+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-22T12:43:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=aa033b1ea9707dda78e9cb75dfe1b13b78db11b5'/>
<id>urn:sha1:aa033b1ea9707dda78e9cb75dfe1b13b78db11b5</id>
<content type='text'>
Two gaps in cj/hugo-preview surfaced during manual testing.

First, the browser opened one second after start-process returned. On any non-trivial site, Hugo takes several seconds to finish its initial build before it binds port 1313. The browser requested the page before the server existed and got ERR_CONNECTION_REFUSED. Replaced the fixed one-second run-at-time with a process filter that watches Hugo's output for "Web Server is available at" — the line Hugo prints once it has actually bound the port. The browser now opens at the right moment regardless of build time. The filter clears itself after firing so subsequent output does not re-open tabs.

Second, if Hugo exited on its own (for example a template error in the theme), the preview command went silent with no indication that anything was wrong. Added a process sentinel that clears cj/hugo--preview-process on any exit and prints "hugo server crashed (exit N) — see *hugo-server* buffer" when the exit status is non-zero. User-initiated stops arrive as signal status and remain silent because cj/hugo-preview already prints its own stop message.
</content>
</entry>
<entry>
<title>refactor(hugo): prune stale header, group functions by purpose</title>
<updated>2026-04-22T12:14:50+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-22T12:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=de72468d1fe8e15354f398dc22d7469093e7ef65'/>
<id>urn:sha1:de72468d1fe8e15354f398dc22d7469093e7ef65</id>
<content type='text'>
Two small cleanups on hugo-config.el after the feature commits.

The file header listed only five bindings (n, e, o, O, d) and called the lowercase-d binding "Toggle draft." Both are now wrong. Replaced the listing with a pointer to the keybindings section at the bottom and to the which-key panel, which are the real sources of truth and do not rot.

The functions used to live under one generic "Hugo Blog Functions" header. Regrouped them by purpose: Post Creation, Post Export, Directory Navigation, Draft Management, Preview and Publish. Moved the two picker helpers (cj/hugo--post-metadata and cj/hugo--collect-drafts) into the Draft Management section. No behavior change.

All seven ERT tests still pass.
</content>
</entry>
<entry>
<title>feat(hugo): draft picker, preview toggle, publish command</title>
<updated>2026-04-22T11:57:00+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-22T11:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=96c73033bbd759054d394172dfad6971816c3dc3'/>
<id>urn:sha1:96c73033bbd759054d394172dfad6971816c3dc3</id>
<content type='text'>
Put the full Hugo workflow inside Emacs. All of it lives in modules/hugo-config.el.

New functions:
- cj/hugo-open-draft reads all .org files under content-org/log, finds those with #+hugo_draft: true, and offers a completing-read picker.
- cj/hugo-preview toggles a local hugo server subprocess and opens the preview URL in the browser. A second press stops the server.
- cj/hugo-publish opens magit-status on the website repo. The server-side post-receive hook on cjennings.net already rebuilds and deploys on push, so committing and pushing is the deploy.

Two pure helpers support the picker: cj/hugo--post-metadata parses the front matter region of a post, and cj/hugo--collect-drafts walks a directory and filters to drafts. Seven ERT tests cover both helpers across normal, boundary, and error cases.

Keybinding note: C-; h d and C-; h D have swapped roles. Lowercase d now opens the draft picker. Uppercase D toggles the draft flag in the current buffer. The previous lowercase-d binding was toggle.
</content>
</entry>
<entry>
<title>test: add ERT coverage for modeline-config and hugo-config</title>
<updated>2026-02-14T06:45:55+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-14T06:45:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=07267eae8ef41baf314e0817044569dc9f9ce255'/>
<id>urn:sha1:07267eae8ef41baf314e0817044569dc9f9ce255</id>
<content type='text'>
Add 67 tests across 6 new test files for modeline and hugo modules.
Refactor hugo-config: extract post-file-path and post-template helpers
from interactive new-post function for testability. Update todo.org
with test audit (31 modules), priority adjustments, and task cleanup.
</content>
</entry>
<entry>
<title>feat(hugo): extract hugo-config module with C-; h keybindings</title>
<updated>2026-02-14T06:06:45+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-14T06:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=cb44e9cae2284585cf77f9cf6927947c066db45d'/>
<id>urn:sha1:cb44e9cae2284585cf77f9cf6927947c066db45d</id>
<content type='text'>
Standalone module for ox-hugo blog workflow. One-file-per-post
structure with keybindings for new post, export, open dir (dirvish
and system file manager), and toggle draft.
</content>
</entry>
</feed>
