diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-22 06:57:00 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-22 06:57:00 -0500 |
| commit | e4399058a8424a481df1b02f60be7de78aeb7ecc (patch) | |
| tree | 5950b2baabdf52b494492d05c2fa7926ce06dd5f /tests/test-integration-buffer-diff.el | |
| parent | c5c815eb3701c8d5a900020ae10c88cb21535cab (diff) | |
| download | dotemacs-e4399058a8424a481df1b02f60be7de78aeb7ecc.tar.gz dotemacs-e4399058a8424a481df1b02f60be7de78aeb7ecc.zip | |
feat(hugo): draft picker, preview toggle, publish command
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.
Diffstat (limited to 'tests/test-integration-buffer-diff.el')
0 files changed, 0 insertions, 0 deletions
