From 00574fa648002d2a946cc0bc9b5243bee5f3ad8e Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 1 Jul 2024 16:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0static=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=AD=98=E6=94=BE=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Gmeek.py b/Gmeek.py index fbafed1..0fcbee7 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -38,6 +38,7 @@ class GMEEK(): self.options=options self.root_dir='docs/' + self.static_dir='static/' self.post_folder='post/' self.backup_dir='backup/' self.post_dir=self.root_dir+self.post_folder @@ -72,6 +73,10 @@ class GMEEK(): os.mkdir(self.root_dir) os.mkdir(self.post_dir) + if os.path.exists(self.static_dir): + shutil.copytree(self.static_dir, self.root_dir) + print("Copy static to docs") + 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":{}} config=json.loads(open('config.json', 'r', encoding='utf-8').read())