This repository has been archived by the owner on Aug 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
index shows full posts not except #194
Comments
I got it working after following this tutorial.
{{ post.excerpt }}
<!-- Whether or not to display the "read more" button -->
{% capture content_words %}{{ post.content | number_of_words }}{% endcapture %}
{% capture excerpt_words %}{{ post.excerpt | number_of_words }}{% endcapture %}
{% if excerpt_words != content_words %}
<a href="{{ post.url }}#read-more" class="btn btn-info">Read More</a>
{% endif %}
{{ content | replace: '{{ site.excerpt_separator }}', '<a class="anchor" id="read-more"></a>' }}
a.anchor{
display: block;
position: relative;
top: -99px;
visibility: hidden;
}
excerpt_separator: "<!--break-->" If you want to override the excerpt entirely, specify the |
@Purpzie Thanks for the solution, That works fine !!!!! |
@Purpzie Thanks for sharing. I don't believe the post.html and sass changes are necessary -- what was the intention with those? Only making the change to index.html and _config.yml will do the trick for this. |
warningmonster
added a commit
to warningmonster/warningmonster.github.io
that referenced
this issue
Oct 28, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
How do I stop the index displaying the entire post? I just want to show an excerpt - for example the first paragraph - thanks
The text was updated successfully, but these errors were encountered: