If I use the automatically generated {{ .Summary }} all of the HTML is stripped from the output. Is there any way to retain the HTML associated with the file being summarised? For example, with a post markdown file with content like this at the beginning:
## First header
This is a first sentence _for example_.
This is a second sentence, new paragraph.
If I use the automatic {{ .Summary }} for this page, it renders as:
First header This is a first sentence for example. This is a second sentence, new paragraph.
(note: this also happens with {{ .Summary | safeHTML }}.
What I would expect to render is the HTML also:
<h2>First header</h2>
<p>This is a first sentence for example.</p>
<p>This is a second sentence, new paragraph.</p>
As a small work-around I’m using: {{ .Content | safeHTML | truncate 500 }}.
Where I truncate the full post by N characters (but this is not as nice as the autosummary - sometimes the break is in the middle of a sentence with ellipses).
If the automatic summary would pass the full HTML, we could still plainify the output to get similar results as now.
It’s a shame if that’s the preferred method as I rather like the auto generated summary. It does a good job on its own.
I’d just prefer if the behavior was consistent between using auto, or manual (ie: they both produce HTML output be default). This way we can consistently plainify the output if that’s what’s desired.
(note: the presence of a <!--more--> tag will allow the .Summary to output HTML)