eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

Best method to remove common template parts from collections.all.templateContent?

Open jasonday opened this issue 5 years ago • 2 comments

for:

{%- for item in collections.all %}
<li>
    {{ item.url }}<br/>
    {{ item.date }}<br/>
    {{ item.templateContent | striptags | }}
</li>

I can use nunjucks replace to remove matching strings (so all of the other repeated page content such as navigation, footer items, etc), but is there a better way to remove elements by selector or by tag in templating?

jasonday avatar Jun 17 '20 16:06 jasonday