如何在 Jekyll 中仅显示第一段或定义摘录

dav*_*rey 1 jekyll

我准备了这篇文章

---
layout: post
tags:
- tag1
title: Post Title 1
categories:
- category1
---

Excerpt for post 1    

<!-- More -->

Body of post 1
Run Code Online (Sandbox Code Playgroud)

我正在使用{{ post.excerpt }}并在 _config.yml 中设置

excerpt_separator: "<!-- more -->"
Run Code Online (Sandbox Code Playgroud)

但在页面上它仍然显示摘录和正文。

Mad*_*uja 5

这个怎么样

{{ post.content | strip_html | truncatewords: 50 }}