Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 819f19d

Browse files
committed
bugfix
1 parent 6f60263 commit 819f19d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

template/articles/detail.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ <h1 id="title" data-id="{{.article.Id}}">
187187
$('code[class*="language-"]').parent('pre').addClass('line-numbers');
188188
</script>
189189
<script type="text/javascript" src="/static/js/prism.js"></script>
190+
{{end}}
191+
{{if .article.Markdown}}
190192
<script type="text/javascript" src="/static/js/articles.js"></script>
191193
{{end}}
192194
<script type="text/javascript">
@@ -200,8 +202,10 @@ <h1 id="title" data-id="{{.article.Id}}">
200202
];
201203

202204
$(function(){
205+
{{if .article.Markdown}}
203206
new SG.Articles().parseContent($('.page .content'));
204-
207+
{{end}}
208+
205209
// 文本框自动伸缩
206210
$('.need-autogrow').autoGrow();
207211

0 commit comments

Comments
 (0)