aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-22 06:57:00 -0500
committerCraig Jennings <c@cjennings.net>2026-04-22 06:57:00 -0500
commit31e481cf3db0c72eaf304f5fc6f0a8ec512f8095 (patch)
tree2909a9fa340f75997e761f478f1be882fcd4a768 /init.el
parentadac0411a0c1a116ad11ecce17f5e987770d3232 (diff)
downloaddotemacs-31e481cf3db0c72eaf304f5fc6f0a8ec512f8095.tar.gz
dotemacs-31e481cf3db0c72eaf304f5fc6f0a8ec512f8095.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 'init.el')
0 files changed, 0 insertions, 0 deletions