From 903f7753f30cafc88503227b912dfd5b891f417d Mon Sep 17 00:00:00 2001 From: yossydev Date: Mon, 14 Oct 2024 20:35:23 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E7=B7=A8?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/libs/posts/generate-post.mjs | 3 ++- app/libs/posts/template.mdx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 ---