[feat] add hugo_section config

This commit is contained in:
SouthFox 2024-06-04 20:35:22 +08:00
parent 121e674c38
commit 1d81f912f6
2 changed files with 32 additions and 42 deletions

View file

@ -83,22 +83,17 @@
'(("m" "main" plain
"%?"
:if-new (file+head "main/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: main\n")
:immediate-finish t
:unnarrowed t)
("r" "references" plain "%?"
:if-new
(file+head "references/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
:immediate-finish t
:unnarrowed t)
("t" "ttk" plain "%?"
:if-new
(file+head "ttk/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
(file+head "references/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: references\n")
:immediate-finish t
:unnarrowed t)
("a" "article" plain "%?"
:if-new
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n")
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n#+hugo_section: articles\n")
:immediate-finish t
:unnarrowed t)))
@ -108,7 +103,7 @@
:target (file+head "%<%Y-%m-%d>.org"
":PROPERTIES:
:header-args: :exports both\n:END:
#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n"))))
#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: daily\n"))))
(use-package! websocket
:after org-roam)

View file

@ -122,22 +122,17 @@
'(("m" "main" plain
"%?"
:if-new (file+head "main/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: main\n")
:immediate-finish t
:unnarrowed t)
("r" "references" plain "%?"
:if-new
(file+head "references/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
:immediate-finish t
:unnarrowed t)
("t" "ttk" plain "%?"
:if-new
(file+head "ttk/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
(file+head "references/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: references\n")
:immediate-finish t
:unnarrowed t)
("a" "article" plain "%?"
:if-new
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n")
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n#+hugo_section: articles\n")
:immediate-finish t
:unnarrowed t)))
@ -147,7 +142,7 @@
:target (file+head "%<%Y-%m-%d>.org"
":PROPERTIES:
:header-args: :exports both\n:END:
#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n"))))
#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: daily\n"))))
#+end_src
** org-roam-ui