diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-08 08:24:40 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-08 09:37:21 +0300 |
commit | fc917bf829c8a7cbf950754abc7085ffb00dbf17 (patch) | |
tree | debaa476835926b80af97d47d4df6c7a72c2e0c7 /jt.md | |
parent | 518e7dc2d5f97387702af0a300cc2842bd0deec6 (diff) | |
download | jt2-fc917bf829c8a7cbf950754abc7085ffb00dbf17.tar.gz |
feat! add support for tera templates for new journal entries
There is a hardcoded default template, plus one can be overridden per
journal by adding a .config/templates/new_entry file in the journal.
Diffstat (limited to 'jt.md')
-rw-r--r-- | jt.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -224,6 +224,28 @@ then there are no drafts in jrnl +## Override template for new journal entries + +Verify that we can have a custom template for new journal entries. + +~~~scenario +given an installed jt + +when I run jt2 --dirname jrnl init default "My test journal" +then command is successful + +given file jrnl/.config/templates/new_entry from new_entry_template + +when I run jt2 --editor=none --dirname=jrnl new "Abracadabra" +then command is successful +and there is one draft in jrnl +and draft 0 in jrnl contains "custom new entry template" +~~~ + +~~~{#new_entry_template .file .numberLines} +This is a custom new entry template. +~~~ + # Colophon This document is meant to be processed with the [Subplot][] program to |