foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.26k stars 649 forks source link

filepath - setting from foam_template is ignored when creating note from template #842

Closed matthiasdaues closed 2 years ago

matthiasdaues commented 2 years ago

Summary The filepath string from the "foam_template"-YAML-block is ignored when creating a note from template.

Steps to reproduce

  1. Select F1 -> Foam: Create New Note From Template
  2. Enter a title in the prompt
  3. Enter a filename in the prompt

Additional information

The YAML frontmatter looks like this:

---
tags: note, ${1:Tag1}
author: ${2:user}
bibliography: [/home/user/Zotero/export/zotero.bib]
title: $FOAM_TITLE
foam_template: # foam template metadata
    filepath: "/home/user/zettelkasten/$FOAM_DATE_YEAR$FOAM_DATE_MONTH$FOAM_DATE_DATE$FOAM_DATE_HOUR$FOAM_DATE_MINUTE $FOAM_TITLE.md"
    name: 01 - Notiz
    description: Ein generischer Zettel für alle Fälle
---

Step 3 should not happen, since the filepath is stated as an absolute path.

riccardoferretti commented 2 years ago

thanks for reporting this, I found a typo in the property name computing the file path. will fix and add a test case

matthiasdaues commented 2 years ago

Thank you. The issue #831 is gone, btw. Best, MD

matthiasdaues commented 2 years ago

Thank you. It works like a charm again, also in a multi-root workspace. Best regards MD