Skip to content

Daily note without the filepath in frontpiece of template created in absolute path #1537

@jimgraham

Description

@jimgraham

Describe the bug

In v0.28.0 and above, the absolute path is being re-used as the relative path.

Small Reproducible Example

No response

Steps to Reproduce the Bug or Issue

This is hard to reproduce (seems to combine symlinks, spaces in the path, and the notes template)

I have my zettelkasten in my Google Drive. I have a daily-notes.md template without the foam_template: filepath keys

  • /Users/jimgraham/My Drive ([email protected])/zettelkasten
  • In v0.27, using /today → Creates in the journal/ subdirectory
  • In v0.28.0 and above, the full path is recreated, so the path is:

If I add the following to my daily-note.md template

---
tags: journal
foam_template:
    filepath: "journal/${FOAM_DATE_YEAR}-${FOAM_DATE_MONTH}-${FOAM_DATE_DATE}.md"
    description: "Daily note template"
---

then the note is created in the correct directory /Users/jimgraham/My Drive ([email protected])/zettelkasten/journal/2025-10-20.md

Expected behavior

Expect the daily note to be created in the correct subdirectory without having to add it to the frontpiece of the note template

Screenshots or Videos

No response

Operating System Version

macOS

Visual Studio Code Version

Cursor 1.7.52 VSCode Version: 1.99.3

Additional context

General info from the log

[info - 12:21:26 PM] Note creation triggered by command: foam-vscode.create-note
[info - 12:21:26 PM] Generic command: foam-vscode.create-note
[info - 12:22:05 PM] Processing markdown template

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions