We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a9e574 commit 5a7c291Copy full SHA for 5a7c291
scripts/mcp-server/index.mjs
@@ -59,11 +59,16 @@ async function createPost(args) {
59
await fs.writeFile(filePath, content, 'utf-8');
60
61
// Add to metadata
62
+ const today = new Date();
63
+ const dateStr = today.getFullYear() + '-' +
64
+ String(today.getMonth() + 1).padStart(2, '0') + '-' +
65
+ String(today.getDate()).padStart(2, '0');
66
+
67
const newPost = {
68
slug,
69
title,
- date: new Date().toISOString().split('T')[0],
- updated: new Date().toISOString().split('T')[0],
70
+ date: dateStr,
71
+ updated: dateStr,
72
description,
73
tags: tags ? tags.split(',').map(t => t.trim()) : [],
74
category: category || 'dev',
0 commit comments