NotePlan / NotePlan/plugins

Templating: add to both top and bottom of the note from templates

Open
#411 0 comments 0 reactions 1 assignee View on GitHub

@mikeerickson is already working on this.

Since Mar 1, 2023.

enhancement
Dominant language
JavaScript
Stars
204
Forks
82
Avg merge
22h 27m
Merged PRs (30d)
3

Description

Since Templating v1.2 we have triggers, and they require special line in frontmatter to turn on.

I have examples now when I want to include turning on a trigger from a template. This means having to use insertion at the top of the new note. But I also want to add some text to the bottom of the note as well.

I can think of two ways to extend Templating to achieve this, and maybe there are others:

  1. Add a special syntax that adds a frontmatter field. If frontmatter doesn't yet exist then it will create it and then add the field and its value.
  2. Add a special syntax that indicates material above is to go at top of note, and material below it at insertion point, or at bottom of file.

As far as I can tell from https://nptemplating-docs.netlify.app/docs/templating-modules/frontmatter-module this isn't yet possible, but I can't see into V2's documentation ...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.