Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll Post Excerpt: How to remove the first paragraph

Tags:

jekyll

I know how to use to define the end of the excerpt, but I'd like to omit the first paragraph of the post as well.

How can this be done?

Thanks in advance all!

like image 460
Tim Avatar asked Dec 14 '22 12:12

Tim


1 Answers

Just got into the same issue. I have a separate place for excerpt and below I want post without excerpt (because it was already displayed). What worked for me was:

<header>
  {{ page.excerpt }}
</header>

<article>
  {{ content | remove_first:page.excerpt }}
</article>

It has to be defined in the same layout you use for posts and posts only.

like image 100
Mateusz Kubuszok Avatar answered Feb 12 '23 08:02

Mateusz Kubuszok