惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
IT之家
IT之家
F
Full Disclosure
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
B
Blog
H
Help Net Security
The Cloudflare Blog
Recorded Future
Recorded Future
P
Proofpoint News Feed
P
Proofpoint News Feed
C
Cisco Blogs
T
Tailwind CSS Blog
P
Palo Alto Networks Blog
D
Docker
爱范儿
爱范儿
Know Your Adversary
Know Your Adversary
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Y
Y Combinator Blog
雷峰网
雷峰网
AWS News Blog
AWS News Blog
D
DataBreaches.Net
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
Blog — PlanetScale
Blog — PlanetScale
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CXSECURITY Database RSS Feed - CXSecurity.com
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
O
OpenAI News

博客园 - CoderZh

[公告]这里的博客将不再更新,最新博客请移步至blog.coderzh.com 使用ThreadSanitizer线程检查工具 小记:《技术进步引发的灵感革命》网易游戏学院第二届公开日 强制链接静态库所有符号(包括未被使用的) 开启Github之旅 Cocos2d-x3.6 Android编译问题 读《程序员的思维训练》 最近的一些变化 成大事者不纠结 读《从0到1》 OpenWrt资料汇总 C++开源代码覆盖率工具OpenCppCoverage介绍(Windows) Facebook网络模拟测试工具ATC使用 为什么心跳包(HeartBeat)是必须的? DigitalOcean上使用Tornado+MongoDB+Nginx+Supervisor+DnsPod快速搭建个人博客 创业三年来的一些感想 - 创业篇1 创业三年来的一些感想 - 游戏篇 ViEmuVS2013-3.2.1 破解 从CEGUI源码看代码规范
使用Jekyll官方的ReadMore摘要功能
CoderZh · 2015-08-15 · via 博客园 - CoderZh

今天才发现,Jekyll官方就支持ReadMore摘要功能,记录一下。

我之前的方法,在index.html中

{{ post.content ||split:'<!-- more -->' | first }}

然后在Post里,需要分隔的摘要后面加<!-- more -->。

摘要内容...
<!-- more -->
正文内容...

官方做法: excerpt

官方的方法是,在_config.yml里,指定摘要的分隔符:

excerpt_separator:  '<!-- more -->'

然后,在index.html中:

{{ post.excerpt }}

一般情况下,摘要需要去掉html标签,所以一般这样用:

{{ post.excerpt | strip_html }}

然后,和前一种方法一样,在摘要后面加<!-- more --> 即可。