From 47a33a939f3274a9d5a85f1b29abbf5886c0a056 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 29 Jan 2024 13:23:02 +0800 Subject: [PATCH] =?UTF-8?q?showPostSource=E6=9D=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BAgithub=E6=BA=90=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 2 +- templates/post.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index 3fb3bdd..fd6acc8 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -61,7 +61,7 @@ def cleanFile(self): 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":""} + 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} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) self.blogBase={**dconfig,**config}.copy() self.blogBase["postListJson"]=json.loads('{}') diff --git a/templates/post.html b/templates/post.html index d852831..83bde0a 100644 --- a/templates/post.html +++ b/templates/post.html @@ -27,18 +27,20 @@ {% block header %}

{{ blogBase['postTitle'] }}

- + + {% if blogBase['showPostSource']==1 %} + {% endif %}