You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently allow the use of a template file to seed a new entry. This file is currently a flat text file and is taken verbatim into the editor when creating a new entry.
It would be nice to (optionally) interpret this template file using some syntax (like Jinja) to add some functionality to these templates.
This would allow the use of Jinja syntax in these templates, which would allow things like using custom fields, or making loops in the template.
Example Usage
{# templates/some-other-template-to-include.jrnl #}
Hello {{ name }}! This is a template of some sort.
{%ifmy_field > 32 %}
Lorem ipsum dolor sit amet.
{%else%}
Also, lorem ipsum dolor sit amet.
{%endif%}
etc
Other Information
It should be a problem, but the ability to discard an entry if the template text didn't change merits some extra consideration with this new feature to make sure nothing breaks.
The text was updated successfully, but these errors were encountered:
Use Case/Motivation
We currently allow the use of a template file to seed a new entry. This file is currently a flat text file and is taken verbatim into the editor when creating a new entry.
It would be nice to (optionally) interpret this template file using some syntax (like Jinja) to add some functionality to these templates.
This would allow the use of Jinja syntax in these templates, which would allow things like using custom fields, or making loops in the template.
Example Usage
Other Information
It should be a problem, but the ability to discard an entry if the template text didn't change merits some extra consideration with this new feature to make sure nothing breaks.
The text was updated successfully, but these errors were encountered: