<%* //const tp = app.plugins.plugins[“templater-obsidian”].templater; const now = new Date(); const day = now.getDay(); // 0=周日, 1=周一, … 6=周六

let templatePath;

// 如果传入了参数 type=task,则用任务模板 if (tp.user.args && tp.user.args.type === “task”) { templatePath = “daily-english-practice”; } else if (day >= 1 && day 5) { templatePath = “daily”; } else { templatePath = “daily-english-practice”; } // 插入模板内容 await tp.file.include(templatePath); %>