From 2915079ab3c2a5e747757f19a1bc99c9c6feb416 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Tue, 5 Sep 2023 22:11:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=BB=A3=E7=A0=81=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E9=9C=80=E6=B1=82=E7=9A=84=E6=96=87=E7=AB=A0=E4=B8=8D?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=AB=98=E4=BA=AECSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 5 +++++ templates/post.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Gmeek.py b/Gmeek.py index e206150..f792043 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -94,6 +94,11 @@ class GMEEK(): post_body=self.markdown2html(f.read()) f.close() + if "highlight" in post_body: + postBase["highlight"]=1 + else: + postBase["highlight"]=0 + postBase=self.blogBase.copy() postBase["postTitle"]=issue["postTitle"] postBase["postBody"]=post_body diff --git a/templates/post.html b/templates/post.html index b2b730e..8766367 100644 --- a/templates/post.html +++ b/templates/post.html @@ -2,7 +2,7 @@ {% block head %} {{ blogBase['postTitle'] }} - +{% if blogBase['highlight']==1 %}{% endif %} {% endblock %} {% block style %}