[feat/garden] filter headline on publish
This commit is contained in:
parent
4abd34b8b4
commit
b6632ce378
1 changed files with 12 additions and 1 deletions
13
config.org
13
config.org
|
@ -234,7 +234,18 @@
|
||||||
(org-roam-update-org-id-locations)
|
(org-roam-update-org-id-locations)
|
||||||
(org-roam-set-keyword "filetags" ":publish:")
|
(org-roam-set-keyword "filetags" ":publish:")
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(org-hugo-export-wim-to-md)
|
(let ((publish-content (buffer-string)))
|
||||||
|
(with-current-buffer (get-buffer-create "*Garden*")
|
||||||
|
(erase-buffer)
|
||||||
|
(insert publish-content)
|
||||||
|
(org-mode)
|
||||||
|
(org-roam-set-keyword "EXPORT_FILE_NAME" (cadar (org-collect-keywords '("title"))))
|
||||||
|
(if-let ((headline (org-find-exact-headline-in-buffer "总结")))
|
||||||
|
(progn
|
||||||
|
(goto-char headline)
|
||||||
|
(org-cut-subtree)))
|
||||||
|
(org-hugo-export-wim-to-md)))
|
||||||
|
|
||||||
(async-shell-command (concat
|
(async-shell-command (concat
|
||||||
"cd " org-hugo-base-dir
|
"cd " org-hugo-base-dir
|
||||||
" && " "git add ."
|
" && " "git add ."
|
||||||
|
|
Loading…
Reference in a new issue