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:
2026-09-07 21:33:03 -04:00
parent 26a1a481ac
commit e027ac4a9e
5 changed files with 29 additions and 10 deletions
+10 -2
View File
@@ -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.
---
+5
View File
@@ -83,6 +83,11 @@
- [ ] Reorder and delete date systems → the day menu immediately follows the configured order and removes the deleted system
- [ ] Enter a non-empty name format with no date token → Settings shows the inline warning
- [ ] Left-click a day still opens/creates its daily note; middle-click still opens it in a new tab
- [ ] With Templater folder mappings for journal and meetings, create a date-system note → Templater expands `<% … %>` syntax rather than leaving it literal
- [ ] Create a journal from the calendar → no duplicate date prompt and no rename; its frontmatter `date` equals the selected calendar day
- [ ] Create a meeting from the calendar for a non-today date → its frontmatter `date` equals the selected calendar day
## Recent Files (Regression)
- [ ] Opening a file adds it to recent files
+6
View File
@@ -35,6 +35,12 @@ Configure systems in **Settings → Waypoint Sidebar → Date systems**. Each sy
Ctrl/Cmd-click a menu entry opens it in a new tab.
### Templater folder templates
If a date system uses a Templater folder mapping, leave its Waypoint **Template file** field blank. Waypoint then creates a safe fallback note while Templater owns prompts, scripts, cursors, and rendered content.
The selected calendar date is encoded in the filename. Templater templates should derive their `date` from `tp.file.title`, not from `tp.date` or `tp.file.creation_date()`. A journal template can retain a prompt-and-rename fallback for manual note creation, but it must skip that flow when the filename already follows `YYYY-MM-DD - Journal`.
## Installation
### Via BRAT
+4 -4
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -115,8 +115,8 @@ export const DEFAULT_SETTINGS: WaypointSettings = {
name: 'Journal',
folder: 'periodic/journal',
nameFormat: 'YYYY-MM-DD - [Journal]',
templateFile: 'resources/template/journal',
typeProperty: 'journal-note',
templateFile: '',
typeProperty: 'journal',
icon: 'book-open',
},
{
@@ -124,8 +124,8 @@ export const DEFAULT_SETTINGS: WaypointSettings = {
name: 'Meeting',
folder: 'periodic/meetings',
nameFormat: 'YYYY-MM-DD - {title}',
templateFile: 'resources/template/meeting',
typeProperty: 'meeting-note',
templateFile: '',
typeProperty: 'meeting',
icon: 'users',
},
],