From 49a4a46eb0223ac027e3357f5a6d41e8ba102084 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 1 Jul 2024 15:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87primerCSS=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89CDN=E7=9A=84=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 默认使用南科大 https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/Primer/21.0.7/primer.css --- Gmeek.py | 5 ++++- templates/base.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index 3a8dc43..9ca70b4 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -73,7 +73,7 @@ class GMEEK(): os.mkdir(self.post_dir) 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":{}} + 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":{},"primerCSS":""} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) self.blogBase={**dconfig,**config}.copy() self.blogBase["postListJson"]=json.loads('{}') @@ -88,6 +88,9 @@ class GMEEK(): if "ogImage" not in self.blogBase: self.blogBase["ogImage"]=self.blogBase["avatarUrl"] + if "primerCSS" not in self.blogBase: + self.blogBase["primerCSS"]="" + if "homeUrl" not in self.blogBase: if str(self.repo.name).lower() == (str(self.repo.owner.login) + ".github.io").lower(): self.blogBase["homeUrl"] = f"https://{self.repo.name}" diff --git a/templates/base.html b/templates/base.html index c08a19b..5066103 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ - + {{ blogBase['primerCSS'] }} {%- if blogBase['themeMode']=='manual' -%}