fix(file-templates): update doom doc templates

To reflect the new mode: line added in 7e400ab, and add an ID property.
Also corrects heading level in __doom-readme file template.

Ref: 7e400abdc0
This commit is contained in:
Henrik Lissner 2022-08-03 14:07:03 +02:00
parent 08dac1400f
commit d6ffd2bfaa
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
4 changed files with 31 additions and 4 deletions

View file

@ -352,6 +352,21 @@ This primes `org-mode' for reading."
("doom-suggest-faq" . "id:aa28b732-0512-49ed-a47b-f20586c0f051") ("doom-suggest-faq" . "id:aa28b732-0512-49ed-a47b-f20586c0f051")
("github" . "https://github.com/%s"))) ("github" . "https://github.com/%s")))
;;;###autoload
(defun doom-docs-generate-id (&optional force?)
"Generate an ID for a `doom-docs-org-mode' buffer."
(let ((org-id-link-to-org-use-id t)
(org-id-method 'uuid)
(org-id-track-globally t)
(org-id-locations-file (doom-path doom-cache-dir "doom-docs-org-ids"))
(org-id-locations doom-docs--id-locations)
(org-id-files doom-docs--id-files))
(doom/reload-docs)
(let ((id (org-id-new)))
(org-id-add-location
id (buffer-file-name (buffer-base-buffer)))
id)))
;;;###autoload ;;;###autoload
(define-derived-mode doom-docs-org-mode org-mode "Doom Docs" (define-derived-mode doom-docs-org-mode org-mode "Doom Docs"
"A derivative of `org-mode' for Doom's documentation files. "A derivative of `org-mode' for Doom's documentation files.

View file

@ -1,6 +1,10 @@
# -*- mode: snippet -*- # -*- mode: snippet -*-
# name: Doom category readme # name: Doom category readme
# -- # --
# -*- mode: doom-docs-org -*-
:PROPERTIES:
:ID: `(doom-docs-generate-id)`
:END:
#+title: `(+file-templates-module-for-path)` #+title: `(+file-templates-module-for-path)`
#+created: `(format-time-string "%B %d, %Y")` #+created: `(format-time-string "%B %d, %Y")`
#+since: `(car (split-string doom-version "-"))` #+since: `(car (split-string doom-version "-"))`

View file

@ -1,6 +1,10 @@
# -*- mode: snippet -*- # -*- mode: snippet -*-
# name: Doom documentation # name: Doom documentation
# -- # --
# -*- mode: doom-docs-org -*-
:PROPERTIES:
:ID: `(doom-docs-generate-id)`
:END:
#+title: ${1:Title} #+title: ${1:Title}
#+subtitle: ${2:Subtitle} #+subtitle: ${2:Subtitle}

View file

@ -1,6 +1,10 @@
# -*- mode: snippet -*- # -*- mode: snippet -*-
# name: Doom module readme # name: Doom module readme
# -- # --
# -*- mode: doom-docs-org -*-
:PROPERTIES:
:ID: `(doom-docs-generate-id)`
:END:
#+title: `(+file-templates-module-for-path)` #+title: `(+file-templates-module-for-path)`
#+subtitle: <A one-line quip about this module to display in init.example.el> #+subtitle: <A one-line quip about this module to display in init.example.el>
#+created: `(format-time-string "%B %d, %Y")` #+created: `(format-time-string "%B %d, %Y")`
@ -90,12 +94,12 @@ the purpose of the module and the features/technology(ies) it provides.
# #
# ALSO: Version headings should be linked to the respective heading in # ALSO: Version headings should be linked to the respective heading in
# docs/changelog.org. # docs/changelog.org.
** [[doom-tag:][v21.12.0]] [2021-12-30] *** [[doom-tag:][v21.12.0]] [2021-12-30]
*** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]] **** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]]
commit BODY commit BODY
*** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]] **** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]]
commit BODY commit BODY
*** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]] **** [[doom-ref:a1b2c3d4][commit SUBJECT linked to github commit]]
commit BODY commit BODY
# If no changelog is available, use: # If no changelog is available, use: