From d8bec631b6dee8f5b9c42f75d154252e53e81b77 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 19 Aug 2023 01:22:38 +0000
Subject: [PATCH] update docs on github pages and syncing

---
 quartz/bootstrap-cli.mjs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index 1178303..ee62a56 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -192,7 +192,10 @@
 
       await rmContentFolder()
       if (setupStrategy === "copy") {
-        await fs.promises.cp(originalFolder, contentFolder, { recursive: true })
+        await fs.promises.cp(originalFolder, contentFolder, {
+          recursive: true,
+          preserveTimestamps: true,
+        })
       } else if (setupStrategy === "symlink") {
         await fs.promises.symlink(originalFolder, contentFolder, "dir")
       }
@@ -292,7 +295,6 @@
 
         // follow symlink and copy content
         await fs.promises.cp(linkTarg, contentFolder, {
-          force: true,
           recursive: true,
           preserveTimestamps: true,
         })
@@ -302,7 +304,8 @@
         dateStyle: "medium",
         timeStyle: "short",
       })
-      spawnSync("git", ["commit", "-am", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" })
+      spawnSync("git", ["add", "."], { stdio: "inherit" })
+      spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" })
 
       if (contentStat.isSymbolicLink()) {
         // put symlink back

--
Gitblit v1.10.0