mirror of https://github.com/logseq/logseq
feat: journal file names add custom format support
Add `:journal/file-name-format "yyyy_MM_dd"` to the `config.edn`.pull/706/head
parent
e54ea35131
commit
e22ba14e64
|
@ -182,7 +182,10 @@
|
|||
|
||||
(defn journal-title->default
|
||||
[journal-title]
|
||||
(journal-title-> journal-title #(tf/unparse default-journal-title-formatter %)))
|
||||
(let [formatter (if-let [format (state/get-journal-file-name-format)]
|
||||
(tf/formatter format)
|
||||
default-journal-title-formatter)]
|
||||
(journal-title-> journal-title #(tf/unparse formatter %))))
|
||||
|
||||
(defn journal-title->custom-format
|
||||
[journal-title]
|
||||
|
|
|
@ -190,6 +190,11 @@
|
|||
[repo]
|
||||
(:org-mode/insert-file-link? (get-config repo)))
|
||||
|
||||
(defn get-journal-file-name-format
|
||||
[]
|
||||
(when-let [repo (get-current-repo)]
|
||||
(:journal/file-name-format (get-config repo))))
|
||||
|
||||
(defn get-preferred-workflow
|
||||
[]
|
||||
(keyword
|
||||
|
|
Loading…
Reference in New Issue