From ad55a2b0c0b2bdd6991409fb71f48a0a0f1921d6 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 1 Jul 2024 16:39:12 +0800 Subject: [PATCH] Update Gmeek.py --- Gmeek.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Gmeek.py b/Gmeek.py index 0fcbee7..9dcdae7 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -74,8 +74,16 @@ class GMEEK(): os.mkdir(self.post_dir) if os.path.exists(self.static_dir): - shutil.copytree(self.static_dir, self.root_dir) + for item in os.listdir(self.static_dir): + source = os.path.join(self.static_dir, item) + destination = os.path.join(self.root_dir, item) + if os.path.isdir(source): + shutil.copytree(source, destination) + else: + shutil.copy2(source, destination) print("Copy static to docs") + else: + print("static not exist") def defaultConfig(self): dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","themeMode":"manual","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","indexScript":"","indexStyle":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{}}