I'm either doing something wrong or the way page summaries work is buggy.
Goals:
- On my homepage, in a list of pages, show the page summary but truncate it after a number of characters. I need the separate summary because the page content contains images, and truncating the actual content still leaves the first image in.
- On the page, show only the content, not the summary.
What happens:
- Using the default summary delimiter "===", I must have a blank line before and after or it will not work. If it's up against the text it gets interpreted as a markdown character. But leaving those spaces causes the truncation to not happen: the full summary is shown, not truncated.
- I tried using a different delimiter "^^^", which only solved the markdown problem, not the others.
- On the page itself, the summary shows before the content. I found advice to use a fragile hack:
{% set content = page.content|slice(page.summary|length) %}
But the point of a summary is to not be part of the content itself. Shouldn't the summary not be returned to page.content() in the first place? - If I remove the blank lines from around my delimiter, the above hack breaks.
I don't think the summary functionality is working as expected. Or is there a correct way to handle my case?