How to replace the last <p> tag in Jekyll
2 answers
In my opinion, the best way is CSS:
.excerpt p:last-child::after {
    content: '..';
}
This adds a ".." to the last paragraph of the afterpsuedo-element inside the excerpt div.
<div class="excerpt">
    <p>Normal paragraph.</p>
    <p>Paragraph with trailing ellipsis.</p>
</div>
If you need to do this with Jekyll, you can use a filter sliceto disable the end </p>and a filter appendto add '...</p>'to the end. This will not work if your passage does not end with a paragraph.
+5