Closed xhs345 closed 8 years ago
Can you paste an example of page content that could break http://demo.getgrav.org/gateway-skeleton/ ?
This would be the text from the article in the picture above:
As I noted in the Sydney post, the weather on my first week of arrival was quite [terrible](http://www.dailymail.co.uk/news/article-3627123/Sydney-s-wild-weather-Worst-storm-40-years-devastates-coastal-homes-1000-evacuated-entire-swimming-pool-collapses-ocean.html). Luckly I ...
Link is written as Markdown
Yep it's a matter of how the blog post Twig is written.
It has
{% elseif truncate and readmore is sameas(false) %}
{{ page.content|truncate(200) }}
{% elseif truncate and page.summary != page.content %}
so it cuts at 200 chars, not applying the global site.summary.size
unless readmore is set to true.
You could edit this theme's modular.html.twig and set readmore: true
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true, 'readmore': true} %}
so it removes the html link and puts a read more link at the bottom.
In general, themes are meant to be customized with inheritance https://learn.getgrav.org/themes/customization#theme-inheritance to suit your particular needs, so that's a route to follow, instead of editing the current theme to suit every need.
Ok, thanks for the info.
Since you closed this already I assume you're not interested in a fix. For anyone else finding this: I fixed it for me by using truncate(200, true)
, that way the last word (or in this case link) wont be cut off.
@xhs345 if you post a PR I'll gladly merge it.
Ok, sure. PR open
👍 thanks!
Just a minor issue. If there is a link in an article that gets featured on the front-page and it contains a link then the link to the article will be displayed incorrectly (it's still working as expected).
See image below in the right side: