From e2d5b0f05dfebc10a7f32a545ef341fb37268b78 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Wed, 13 Mar 2024 11:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96config.json=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E8=BF=9B=E4=B8=80=E6=AD=A5=E5=87=8F=E5=B0=91=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gmeek.py b/Gmeek.py index 2a20bf4..2c09df0 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -63,11 +63,13 @@ class GMEEK(): os.mkdir(self.post_dir) def defaultConfig(self): - dconfig={"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1} + dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) self.blogBase={**dconfig,**config}.copy() self.blogBase["postListJson"]=json.loads('{}') self.blogBase["singeListJson"]=json.loads('{}') + if "displayTitle" not in self.blogBase: + self.blogBase["displayTitle"]=self.blogBase["title"] if self.blogBase["i18n"]=="CN": self.i18n=i18nCN elif self.blogBase["i18n"]=="RU":