Comments (10)
https://img2020.cnblogs.com/blog/1153103/202005/1153103-20200519110444547-1077477095.png
from hexo-theme-anatole.
我也遇到了,你解决了吗。。
from hexo-theme-anatole.
是渲染引擎的问题,在渲染代码框的时候,在代码框前会渲染一个的元素出来,td里面有11个span元素包含了1到11,文章里是通过css隐藏了,所以看不到,但是主页是直接截取内容的,所以就显示了1234567891011。目前暂时无解。
from hexo-theme-anatole.
而且这个主题的那个截取标签”<!--more-->“不生效。难受
from hexo-theme-anatole.
目前我用的是其他方案解决的 在mixins.pug模版下 直接渲染html 不转string 通过添加css 显示滑动和最小高度 超出隐藏
` mixins.pug
.post-content.content-hide
- var summary = item.summary || item.content
//- p!= truncate(strip_html(summary), {length: 160})
p!= summary
.post .post-content.content-hide {
max-height: 20vh;
overflow-y: scroll;
}
`
from hexo-theme-anatole.
额 是模版渲染引擎的问题 没办法。还有一种解决方案就是 每篇文章添加 摘要summary
from hexo-theme-anatole.
我觉得还是加上summary 最好。。。
from hexo-theme-anatole.
我觉得还是加上summary 最好。。。
原来是summary,我看主题的文档写的是desc。。感谢
from hexo-theme-anatole.
我直接给它替换掉了,文件在 themes/anatole/layout/mixins.pug
.post-content
- var summary = item.summary || item.content
- summary = strip_html(summary).replace(/\d{12,300}/g , '').trim()
p!= truncate(summary , {length: 160})
目前我观察12到300个数字效果是比较正常的,更低会误杀
from hexo-theme-anatole.
我直接给它替换掉了,文件在 themes/anatole/layout/mixins.pug
.post-content - var summary = item.summary || item.content - summary = strip_html(summary).replace(/\d{12,300}/g , '').trim() p!= truncate(summary , {length: 160})
目前我观察12到300个数字效果是比较正常的,更低会误杀
嗯嗯 很棒 方法很多。
下面是主题自带的summary
主题会在首页输出每篇文章的前 160 个字符,即摘要,如果你想自定义某文章的摘要,请在文章的 Front-matter 里设定 summary: 值。
就像这样:
title: Lorem ipsum dolor
date: 2015-12-31 14:49:13
summary: もっと槙さんにぼんやり金少し説明にえた自分大した人私か影響にというお関係たうませないが、この次第も私か兄具合に使うて、槙さんののに当人のあなたにさぞご意味と行くて私個人が
この中道具の日その学校はあなたごろがすまなりかとネルソンさんの考えるですん、辺の事実ないというご盲従ありたですと、爺さんのためが薬缶が結果までの箸の当時してならて、多少の十月にためからそういう上からとにかくしましないと触れべきものたで、ないうですと多少お人達したのでたた。
from hexo-theme-anatole.
Related Issues (20)
- 安装预览(hexo server)时遇到问题 HOT 6
- 您好,请问如何将百度的自动推送合并进主题呢?
- 强烈建议能否在社交里面添加dribbble / behance 等设计平台。
- demo HOT 2
- 为什么无法集成valine呢? HOT 3
- 文章下方的 evernote icon 分享按鈕 是否已經失效? HOT 2
- 请问,extends partial/layout block content .autopagerize_page_element: .content - page.posts.each(function (item) { include mixins +make_post(item, false) - }) include mixins +make_pager(__('prev'), __('next')) 是什么意思
- 新增一个分类Tab HOT 5
- add a tab in file (nav.yml )
- how to add love.js HOT 1
- 关于去除 share btn 的提醒 HOT 1
- Is jquery actually used?
- 想用一个新建的page做首页,请问题怎么改
- 示例页面打不开了 HOT 2
- 诚邀合作事宜
- 如何使用腾讯云CDN自动刷新
- 无法添加Valine
- font-awesome 太旧了,很多图标都没有
- 如何使用gittalk评论系统 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-anatole.