;; code for the simple (but powerful) automation of posts creation (defvar blog-org-files-directory "/mnt/Data/Documents/org-files/org/blog") (defun generate-blog-file-path () (concat blog-org-files-directory "/" (format-time-string "%Y-%m-%d-%H-%M-%S") ".org")) (setq org-capture-templates `(("b" "Blog Post" entry (file ,(lambda () (generate-blog-file-path))) ; Target file path generation "* DRAFT %i %?\n:PROPERTIES:\n :EXPORT_HUGO_DRAFT: true\n :EXPORT_HUGO_SECTION_FRAG: \n :EXPORT_FILE_NAME: index\n :TITLE: %^{Title}\n :EXPORT_HUGO_CUSTOM_FRONT_MATTER: :subtitle %^{Subtitle}\n :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :summary %^{Summary}\n:END:\n\n" :empty-lines 1 ; Ensure an empty line after the captured content :jump-to-captured t))) ; Jump to the captured entry after completion