Merge branch 'main' of github.com:silverbulletmd/silverbullet
This commit is contained in:
commit
e42faec2e5
@ -105,6 +105,11 @@ export function replaceTemplateVars(s: string, pageName: string): string {
|
||||
lastWeek.setDate(lastWeek.getDate() - 7);
|
||||
return niceDate(lastWeek);
|
||||
}
|
||||
case "nextWeek": {
|
||||
const nextWeek = new Date();
|
||||
nextWeek.setDate(nextWeek.getDate() + 7);
|
||||
return niceDate(nextWeek);
|
||||
}
|
||||
case "page":
|
||||
return pageName;
|
||||
}
|
||||
|
@ -84,4 +84,5 @@ Currently supported (hardcoded in the code):
|
||||
- `{{tomorrow}}`: Tomorrow’s date in the usual YYY-MM-DD format
|
||||
- `{{yesterday}}`: Yesterday’s date in the usual YYY-MM-DD format
|
||||
- `{{lastWeek}}`: Current date - 7 days
|
||||
- `{{nextWeek}}`: Current date + 7 days
|
||||
- `{{page}}`: The name of the current page
|
||||
|
Loading…
Reference in New Issue
Block a user