Skip to content

Commit

Permalink
代码块 css 改为了根据 Hexo 5 来动态加载 prismcss
Browse files Browse the repository at this point in the history
  • Loading branch information
blinkfox committed Nov 27, 2020
1 parent 4105e3a commit 2f03d81
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions layout/_partial/post-detail.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@
</div>
<hr class="clearfix">

<% if (config.prismjs.enable) { %>
<!-- 是否加载使用自带的 prismjs. -->
<link rel="stylesheet" href="<%- theme.jsDelivr.url %><%- url_for(theme.libs.css.prism) %>">
<!-- 代码块折行 -->
<% } %>

<% if (theme.code.break) { %>
<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre-wrap !important; }
</style>
<!-- 代码块折行 -->
<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre-wrap !important; }
</style>
<% } %>

<div class="card-content article-card-content">
Expand Down

0 comments on commit 2f03d81

Please sign in to comment.