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' -%}