mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-31 01:57:54 +00:00
Revise templates for this notebook
This commit is contained in:
parent
a8941aa2f6
commit
639c73618a
45
config.el
45
config.el
@ -55,30 +55,28 @@
|
|||||||
|
|
||||||
(setq
|
(setq
|
||||||
org-roam-v2-ack 't
|
org-roam-v2-ack 't
|
||||||
|
org-roam-node-display-template "${doom-hierarchy:100} ${file:45}"
|
||||||
|
org-roam-node-display-template
|
||||||
|
(format "${doom-hierarchy:*} %s %s"
|
||||||
|
(propertize "${doom-tags:15}" 'face 'org-tag)
|
||||||
|
(propertize "${file:60}" 'face 'font-lock-default-face))
|
||||||
|
|
||||||
org-roam-capture-templates `(("e" "evergreen" plain "%?"
|
org-roam-capture-templates `(("e" "evergreen" plain "%?"
|
||||||
|
(file ,(f-join +wiki-directory "templates" "default.org"))
|
||||||
:target
|
:target
|
||||||
(file+head ,(f-join +wiki-notebook-directory "%<%Y-%m-%d-%H-%M-%S>.org")
|
(file ,(f-join +wiki-notebook-directory "%<%Y-%m-%d-%H-%M-%S>.org"))
|
||||||
"#+title: ${title}
|
|
||||||
#+date: %<%Y-%m-%d %T %:z>
|
|
||||||
#+date_modified: %<%Y-%m-%d %T %:z>
|
|
||||||
#+language: en")
|
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
|
|
||||||
("c" "cards" plain "%?"
|
("c" "cards" plain "%?"
|
||||||
|
(file ,(f-join +wiki-directory "templates" "anki.org"))
|
||||||
:target
|
:target
|
||||||
(file+head ,(f-join +anki-cards-directory-name "%<%Y>.org") "#+title: Anki: ${title}
|
(file ,(f-join +anki-cards-directory-name "%<%Y>.org"))
|
||||||
#+date: %<%Y-%m-%d %T %:z>
|
|
||||||
#+date_modified: %<%Y-%m-%d %T %:z>
|
|
||||||
#+language: en
|
|
||||||
#+property: anki_deck ${title}")
|
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
|
|
||||||
("l" "literature" plain "%?"
|
("l" "literature" plain "%?"
|
||||||
|
(file ,(f-join +wiki-directory "templates" "default.org"))
|
||||||
:target
|
:target
|
||||||
(file+head ,(f-join +wiki-notebook-directory "literature.${slug}.org") "#+title: ${title}
|
(file ,(f-join +wiki-notebook-directory "literature.${slug}.org"))
|
||||||
#+date: %<%Y-%m-%d %T %:z>
|
|
||||||
#+date_modified: %<%Y-%m-%d %T %:z>
|
|
||||||
#+language: en")
|
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
|
|
||||||
("L" "literature reference" plain
|
("L" "literature reference" plain
|
||||||
@ -92,23 +90,8 @@
|
|||||||
(file+head ,(expand-file-name "%<%Y-%m-%d>.org" org-roam-dailies-directory) "#+title: %<%Y-%m-%d>\n"))
|
(file+head ,(expand-file-name "%<%Y-%m-%d>.org" org-roam-dailies-directory) "#+title: %<%Y-%m-%d>\n"))
|
||||||
|
|
||||||
("s" "structured" plain "%?"
|
("s" "structured" plain "%?"
|
||||||
|
(file ,(f-join +wiki-directory "templates" "default.org"))
|
||||||
:target
|
:target
|
||||||
(file+head ,(f-join +wiki-notebook-directory "${slug}.org") "#+title: ${title}")
|
(file ,(f-join +wiki-notebook-directory "${slug}.org"))
|
||||||
:unnarrowed t)))
|
:unnarrowed t)))
|
||||||
|
|
||||||
;; Change how slugs are generated.
|
|
||||||
;; I prefer dashes over the default underscores.
|
|
||||||
;;(eval-after-load "org-roam"
|
|
||||||
;; '(cl-defmethod org-roam-node-slug ((node org-roam-node))
|
|
||||||
;; (let ((title (org-roam-node-title node)))
|
|
||||||
;; (cl-flet* ((strip-nonspacing-marks (s)
|
|
||||||
;; (ucs-normalize-NFC-string (ucs-normalize-NFD-string s)))
|
|
||||||
;; (cl-replace (title pair)
|
|
||||||
;; (replace-regexp-in-string (car pair) (cdr pair) title)))
|
|
||||||
;; (let* ((pairs `(("[^[:alnum:][:digit:]]" . "-")
|
|
||||||
;; ("--*" . "-")
|
|
||||||
;; ("^-" . "")
|
|
||||||
;; ("-$" . "")))
|
|
||||||
;; (slug (-reduce-from #'cl-replace (strip-nonspacing-marks title) pairs)))
|
|
||||||
;; (downcase slug))))))
|
|
||||||
;;; config.el ends here
|
;;; config.el ends here
|
||||||
|
5
templates/anki.org
Normal file
5
templates/anki.org
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#+title: Anki: ${title}
|
||||||
|
#+date: %<%Y-%m-%d %T %:z>
|
||||||
|
#+date_modified: %<%Y-%m-%d %T %:z>
|
||||||
|
#+language: en
|
||||||
|
#+property: anki_deck ${title}
|
4
templates/default.org
Normal file
4
templates/default.org
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#+title: ${title}
|
||||||
|
#+date: %<%Y-%m-%d %T %:z>
|
||||||
|
#+date_modified: %<%Y-%m-%d %T %:z>
|
||||||
|
#+language: en
|
@ -1,9 +1,6 @@
|
|||||||
:properties:
|
|
||||||
:roam_refs: @%^{citekey}
|
|
||||||
:end:
|
|
||||||
#+title: ${title}
|
#+title: ${title}
|
||||||
#+date: %<%Y-%m-%d %T %:z>
|
#+date: %<%Y-%m-%d %T %:z>
|
||||||
#+date_modified: 2021-11-07 00:34:33 +08:00>
|
#+date_modified: %<%Y-%m-%d %T %:z>
|
||||||
#+published: %^{date}
|
#+published: %^{date}
|
||||||
#+author: %^{author}
|
#+author: %^{author}
|
||||||
#+source: %^{url}
|
#+source: %^{url}
|
||||||
|
Loading…
Reference in New Issue
Block a user