maybe using an already existing template format like <https://github.com/joaotavora/yasnippet>
(that is for emacs but it says that one can import templates from textmate, from which the syntax is inspired)
but otherwise just plain text is good enough, one would still be able to use an existing template language and write some glue code in their editor config to make it work nicely
I imagine there could be ./templates dir, from which I could instantiate template using neuron new <template>, plus there would be special names like footer.dhall that would get embedded into every note (which e.g. doesn't have footer: false attribute
We can even go one step ahead and support arbitrary key value pairs (neuron new --template=daily --data="key1=123"), with __KEY1__ somewhere in the template body.
I imagine we don't need a very flexible template system. Initial proposal, to be refined: Templates can be added to a subdirectory, eg: ./templates/daily.md Template vars are simple strings wra...
Proposal I propose the following linking syntax (retaining the underlying link URI): This is current style, and will continue to be supported: <foo> Proposed default: [[foo]] Flexible link, t...
We can even go one step ahead and support arbitrary key value pairs (neuron new --template=daily --data="key1=123"), with __KEY1__ somewhere in the template body.
not sure if that would be really convenient from the editor perspective, it's more intuitive to fill in the values visually
but again nothing prevents me from configuring my editor to work with yasnippet or whatever template language i want, without needing it to be implemented in neuron
Now, instead of just reusing dhall text command, we could evaluate loaded expression using custom special variables in scope (like stuff in Markdown header and arguments to neuron new)
I think at would be good to have the possibility, to set a flag to automatically generate a table of contents at the beginning of the zettel based on the headings in the zettel. Alternative suggest...
Survey: If there is one feature that should go in the next release of Neuron, what would you like that to be?
idea: template zettels
maybe using an already existing template format like <https://github.com/joaotavora/yasnippet>
(that is for emacs but it says that one can import templates from textmate, from which the syntax is inspired)
not sure if this is really editor independent
but otherwise just plain text is good enough, one would still be able to use an existing template language and write some glue code in their editor config to make it work nicely
and you generally have much less templates than zettels, so migrating from one template language to another isn't a problem i think
btw is there a way to remove embeds in zulip markdown?
What about
dhall text
?I imagine there could be
./templates
dir, from which I could instantiate template usingneuron new <template>
, plus there would be special names likefooter.dhall
that would get embedded into every note (which e.g. doesn't havefooter: false
attributeNot that I know of
@felko Not familiar with yasnippet, but I imagine we don't need a very flexible template system. Just have
./templates/daily.md
which looks like this:Then
neuron new --template=daily
Templates are a nice feature. They can work on Cerveau too.
We can even go one step ahead and support arbitrary key value pairs (
neuron new --template=daily --data="key1=123"
), with__KEY1__
somewhere in the template body.@TheMatten I don't understand. How does dhall gets used, say, in the above example?
https://github.com/srid/neuron/issues/328
I forget what I was waiting for haha, maybe theme-support? I guess one thing could be to figure out the alternative links situation?
The alternative links proposal here? https://github.com/srid/neuron/issues/312
Oh yeah!
Sridhar Ratnakumar said:
not sure if that would be really convenient from the editor perspective, it's more intuitive to fill in the values visually
but again nothing prevents me from configuring my editor to work with yasnippet or whatever template language i want, without needing it to be implemented in neuron
@Sridhar Ratnakumar
Now, instead of just reusing
dhall text
command, we could evaluate loaded expression using custom special variables in scope (like stuff in Markdown header and arguments toneuron new
)So we would have full power of (total) programming language for templating
Cool
@TheMatten About the templates / function thing we talked about ... what's a good name for it? Just call it 'templates'? Or 'functions'? Or ...
{{ <name> | <args ...> }}
btw, here's another potential function to support: https://github.com/srid/neuron/issues/291#issuecomment-660075467
I guess they could be called functions, or "template functions" :big_smile: