From 62570915eb4fc03e86e2783c530cc79600a13981 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 19 Feb 2024 10:26:10 +0100 Subject: [PATCH] add: default header on new note --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 9ca227d..4f0d823 100644 --- a/index.php +++ b/index.php @@ -78,7 +78,8 @@ if (!file_exists($dir . '/' . $param)) { - file_put_contents($dir . '/' . $param, ''); + $content = "---\r\ndate: " . substr($now, 0, 10) . "\r\ntags: \r\n---\r\n"; + file_put_contents($dir . '/' . $param, $content); } else if (!$content) {