<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/hugo-config.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-25T22:51:17+00:00</updated>
<entry>
<title>fix(org): guard external-tool assumptions in export and publishing commands</title>
<updated>2026-05-25T22:51:17+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-25T22:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d665582d6fc19c15a772c6ec24ff822e7e3c37f9'/>
<id>urn:sha1:d665582d6fc19c15a772c6ec24ff822e7e3c37f9</id>
<content type='text'>
Four export/publishing commands shelled out to external tools without checking they exist, so a missing tool surfaced as an opaque process error — or, for reveal.js, a silently broken presentation. I added a command-time guard to each that names the tool and what's needed:

- zathura, in the pandoc PDF export-and-open command
- the hugo binary and the platform file-manager opener, in hugo-config
- the local reveal.js checkout (run scripts/setup-reveal.sh), shared by the reveal export and preview commands
- pandoc, in the web-clip protocol handler

The checks run only when the command runs, so startup stays quiet. Each guard has a test asserting the user-error fires when the tool is absent, and the existing happy-path tests now stub the lookups so they exercise the real path rather than tripping the new guard.
</content>
</entry>
<entry>
<title>docs(load-graph): classify Org modules</title>
<updated>2026-05-24T21:34:16+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T21:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=02baa68063f02cc571789c03b1101c28d139200d'/>
<id>urn:sha1:02baa68063f02cc571789c03b1101c28d139200d</id>
<content type='text'>
Seventh classification batch: the thirteen Org modules — config, agenda, babel, capture, contacts, drill, export, noter, refile, reveal, roam, webclipper, hugo. I annotated each header, added a Batch 7 table to the inventory, and extended the validation allowlist. 65 of 102 modules are now classified.

The daily workflows (config, agenda, capture, refile, roam) keep their eager reason per the spec's Phase 6 target. Babel and contacts move to after-load; export, reveal, drill, noter, webclipper, and hugo become command-loaded. The agenda and refile idle-timer caches are recorded as the side effects the spec already tracks for cache-lifecycle work. No new hidden dependencies.
</content>
</entry>
<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>
