<%*
const currentDate = tp.date.now (“YYYY-MM-DD”);
const year = tp.date.now (“YYYY”);
const month = tp.date.now (“MM”);
const day = tp.date.now (“DD”);
// 替换为目标目录路径,相对于 Obsidian 的工作目录
const dailyDirectory = CYG-Works/日常笔记-Daily/${year}-${month};
const formattedFileName = ${currentDate};
const filePath = ${dailyDirectory}/${formattedFileName};
// 注意:确保目标目录存在,否则该操作可能会失败
//await tp.file.rename (formattedFileName)
await tp.file.move(filePath);
%>
<%- await tp.file.include (“日常笔记模板”) -%>