fix: let Templater own date-system templates
Leave the default Journal and Meeting systems without a raw Waypoint template so Templater folder triggers own interactive rendering. Their fallback frontmatter now matches the journal and meeting types. Document the required folder-trigger setup and selected-date filename contract.
This commit is contained in:
+10
-2
@@ -176,6 +176,14 @@ Configured systems live in `settings.dateSystems`, where array order is menu ord
|
||||
| `journal` | Journal | `periodic/journal` | `YYYY-MM-DD - [Journal]` | one |
|
||||
| `meetings` | Meeting | `periodic/meetings` | `YYYY-MM-DD - {title}` | many |
|
||||
|
||||
### Templater folder triggers
|
||||
|
||||
Waypoint deliberately does not evaluate Templater syntax. For an interactive Templater template, configure Templater's **Trigger Templater on new file creation** mode for the relevant folder, then leave that date system's `templateFile` blank in Waypoint. Waypoint creates a safe fallback note from `typeProperty` and the selected `YYYY-MM-DD` date; Templater's folder trigger owns the rendered content, prompts, scripts, and cursor placement.
|
||||
|
||||
The target filename is the contract between them. A calendar-created journal note is already named `YYYY-MM-DD - Journal`; a meeting is already `YYYY-MM-DD - {title}`. Templates must extract the date from `tp.file.title`, not `tp.date` or `tp.file.creation_date()`, because those refer to when Templater runs rather than the date selected in the calendar.
|
||||
|
||||
The journal template may retain a manual fallback: only prompt for a date and rename when `tp.file.title` does **not** match the date-system filename. That preserves manual note creation without a prompt or rename race on calendar creation.
|
||||
|
||||
### The `{title}` convention
|
||||
|
||||
`nameFormat` is a moment format string, so literal text needs bracket escaping — `YYYY-MM-DD - [Journal]` — the same convention the periodic formats `GGGG-[W]WW` and `YYYY-[Q]Q` already use.
|
||||
@@ -239,8 +247,8 @@ openDateSystemNote(
|
||||
|
||||
A single creation path shared by periodic notes and date systems; it replaced the period-only `createPeriodNote`.
|
||||
|
||||
1. Read the template at `system.templateFile` (the `.md` extension is appended when omitted). If it exists, the note is created with the template's contents.
|
||||
2. With no template, the note is created with minimal frontmatter instead: `type: {system.typeProperty}` + `date: YYYY-MM-DD`.
|
||||
1. With a non-empty `system.templateFile`, reads it (appending `.md` when omitted) and creates the note with its raw contents. This is for plain, non-Templater templates.
|
||||
2. With no template, the note is created with minimal frontmatter instead: `type: {system.typeProperty}` + `date: YYYY-MM-DD`. Use this mode with a Templater folder trigger, which replaces that fallback content with its rendered template.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user