diff --git a/app/libs/posts/generate-post.mjs b/app/libs/posts/generate-post.mjs index b610843..47615f8 100644 --- a/app/libs/posts/generate-post.mjs +++ b/app/libs/posts/generate-post.mjs @@ -77,7 +77,8 @@ function generatePost() { const updatedData = data .replace(/{{title}}/g, title) // 文書全体のタイトルプレースホルダを置き換え .replace(/{{description}}/g, description) - .replace(/{{date}}/g, currentDate); + .replace(/{{date}}/g, currentDate) + .replace(/{{filePath}}/g, filePath); writeFile(filePath, updatedData, (err) => { if (err) { diff --git a/app/libs/posts/template.mdx b/app/libs/posts/template.mdx index 43a2c08..338605f 100644 --- a/app/libs/posts/template.mdx +++ b/app/libs/posts/template.mdx @@ -2,6 +2,8 @@ title: "{{title}}" description: "{{description}}" date: "{{date}}" +updatedAt: "{{date}}" +path: "{{filename}}" published: true ---