没有代码高亮需求的文章不加载高亮CSS
This commit is contained in:
parent
a447a824d8
commit
2915079ab3
5
Gmeek.py
5
Gmeek.py
@ -94,6 +94,11 @@ class GMEEK():
|
|||||||
post_body=self.markdown2html(f.read())
|
post_body=self.markdown2html(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
if "highlight" in post_body:
|
||||||
|
postBase["highlight"]=1
|
||||||
|
else:
|
||||||
|
postBase["highlight"]=0
|
||||||
|
|
||||||
postBase=self.blogBase.copy()
|
postBase=self.blogBase.copy()
|
||||||
postBase["postTitle"]=issue["postTitle"]
|
postBase["postTitle"]=issue["postTitle"]
|
||||||
postBase["postBody"]=post_body
|
postBase["postBody"]=post_body
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<title>{{ blogBase['postTitle'] }}</title>
|
<title>{{ blogBase['postTitle'] }}</title>
|
||||||
<link href="//unpkg.com/@wooorm/starry-night@2.1.1/style/both.css" rel="stylesheet" />
|
{% if blogBase['highlight']==1 %}<link href="//unpkg.com/@wooorm/starry-night@2.1.1/style/both.css" rel="stylesheet" />{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user