summaryrefslogtreecommitdiff
path: root/modules/hugo-config.el
Commit message (Collapse)AuthorAgeFilesLines
* 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.