Commit 316fdf3
fix(templates): point periodic/one-on-one defaults at periodic-note/ subfolder
Context: The vault's _system/templates layout was reorganized so periodic
and one-on-one templates live under a periodic-note/ subfolder, mirroring
the existing quick-capture/ subfolder. DEFAULT_SETTINGS and
ensureTemplatesFolder still referenced the old flat paths.
Problem:
- DEFAULT_SETTINGS periodic + oneOnOne templatePaths pointed at the flat
_system/templates/<Name>-Note.md, which no longer exist on disk.
- ensureTemplatesFolder destructured only { daily, weekly, monthly,
quarterly } from periodicNotes, so the yearly template was never
scaffolded for new vaults.
Solution:
- Repoint daily/weekly/monthly/quarterly/yearly/oneOnOne defaults at
_system/templates/periodic-note/<Name>-Note.md.
- Include yearly in the ensureTemplatesFolder destructure + path list.
- Update the templates.service test expectations to the new paths and
add the Yearly-Note.md write assertion.
Behavior: New vaults scaffold all six periodic/one-on-one templates under
periodic-note/ (yearly included); existing vaults resolve templates from
the relocated files.
Files:
- src/lib/core/settings/settings.store.svelte.ts:13-50 (six templatePaths)
- src/lib/plugins/templates/templates.service.ts:78-79 (add yearly)
- src/tests/lib/plugins/templates/templates.service.test.ts:192-201 (paths + yearly)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c864e36 commit 316fdf3
3 files changed
Lines changed: 14 additions & 13 deletions
File tree
- src
- lib
- core/settings
- plugins/templates
- tests/lib/plugins/templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | | - | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| |||
0 commit comments