vscode-journal icon indicating copy to clipboard operation
vscode-journal copied to clipboard

The weekly template doesn't work, template name 'weekly' should be changed to 'week'

Open luanrz opened this issue 11 months ago • 0 comments

The weekly entry title defaults to # Week ${week}\n\n.

When i try to customize the weekly template configuration in the settings.json file like below, it doesn't work.

"journal.templates": [
    {
        "name": "weekly",
        "template": "# ${year}-${week}\n\n"
    }
]

The journal.templates configuration is automatically generated by vscode and the default value is provided by package.json file.

I noticed that the getWeeklyTemplate method of src/ext/conf.ts file use the week _id to generate the weekly template. Then i update the value of journal.templates.name from weekly to week, it does work.

So i suggest to update the journal.templates.default.name from weekly to week in the package.json file, To prevent vscode from automatically generating incorrect configurations.

luanrz avatar Jan 02 '25 12:01 luanrz