shenliyang / hexo-theme-snippet

Snippet 简洁而不简单,也许是一款你寻找已久的hexo主题
https://snippet.shenliyang.com/
MIT License
1.09k stars 208 forks source link

文章摘要md 文件无法编译 #110

Closed Lee981265 closed 5 years ago

Lee981265 commented 5 years ago

image

正文是正常的 image

shenliyang commented 5 years ago

因为摘要部分内容会对html原生标签进行过滤包括(< > ),避免一些不要问题出现。 解决方案:修改源码archive.ejs文件,去掉标签过滤功能(非常不推荐, 可能会引发更多问题)

<%= truncate(strip_html(post.content), {length: theme.excerptLength || 120, separator: ''}) %>
改为:
<%= truncate(post.content, {length: theme.excerptLength || 120, separator: ''}) %>