I’m using the Blog Skeleton and it seems that the startpage always shows ‘Continue reading’ at the end of each article, regardless of the length. See the 2nd entry ‘Just some text today’. It contains 2 line breaks at the end, but even after removal it still shows ‘Continue reading’. The text has no more than 550 characters so it’s not necessary to truncate. How could this be changed? In general I like to truncate after a certain amount of characters (e.g. 550) but ‘Continue Reading’ should not appear if it has less characters.
Thanks!
Dear Kai,
I just checked your issue and you are right. Basicly this is an issue of the default Antimatter theme and I can only give you a workaround here. You can solve it by editing
user/themes/anitmatter/templates/partials/blog_item.html.twig
around line 50 from
{% elseif truncate %}
{{ page.content|truncate(550) }}
<p><a href="{{ page.url }}">Continue Reading...</a></p>
{% else %}
to
{% elseif truncate %}
{{ page.content }}
{% else %}
Then add
summary:
size: 100000
to your user/config/site.yaml
file and delete all occuring “===” in the pages files e.g. in “item.md” of “sunshine-in-the-hills”. The summary size in the site.yaml can be arbitrary, but it should be greater than your longest article (here I set a cutoff of 100.000 characters).
If you want to switch off the continue link only for one page then you can directly add
continue_link: false
in your page header.
Hope that helps.
I was going to reply but @sommerregen has already covered everything!
Hi all,
yes, I also thought about this option but that’s why I wrote “In general I like to truncate”… I hoped to have both: Hide “Continue reading” if less then 550 characters are used, and truncate if more than 550. I guess it will be fixed with one of the next releases?
Hi Kai,
sorry for my long abscence. Concerning your question, it is sufficient to set
summary:
size: 550
and consider all other points in my previous post (i.e. change theme template and delete all “===” in your .md-files). And yes, your issue will be fixed with one of the next releases (at least for the Grav core).