UNPKG

815 BHTMLView Raw
1{% macro feedThumbnail(piece) %}
2 {% if aposAreaImage(piece, 'body') %}
3 {# Most but not all feed readers will ignore the float, but it's nice to try. #}
4 <img style="display: block; float: left; padding: 10px" src="{{ aposFilePath(aposAreaImage(piece, 'body'), { size: 'one-sixth' }) }}" />
5 {% endif %}
6{% endmacro %}
7
8{% macro feedBody(piece) %}
9 {% if piece.body %}
10 {% if options.summary %}
11 {{ aposAreaPlaintext({ area: piece.body, truncate: options.characters }) | e }}
12 {% else %}
13 {# This helper is good for bypassing all the outer wrapper markup of an area which is #}
14 {# unsuitable for RSS feeds #}
15 {# Ignore all widgets, simple HTML text only #}
16 {{ aposAreaContent(piece.body.items, { allowed: [ 'richText' ] }) }}
17 {% endif %}
18 {% endif %}
19{% endmacro %}