aboutsummaryrefslogtreecommitdiff
path: root/modules/hugo-config.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor(hugo): prune stale header, group functions by purposeCraig Jennings2026-04-221-38/+41
| | | | | | | | | | 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.
* feat(hugo): draft picker, preview toggle, publish commandCraig Jennings2026-04-221-2/+79
| | | | | | | | | | | | | 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.
* test: add ERT coverage for modeline-config and hugo-configCraig Jennings2026-02-141-14/+25
| | | | | | | 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.
* feat(hugo): extract hugo-config module with C-; h keybindingsCraig Jennings2026-02-141-0/+124
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.