code template

This commit is contained in:
m
2026-03-25 08:08:07 +01:00
parent 20fce270a5
commit 2118d9fbc0
5 changed files with 26 additions and 3 deletions

View File

@@ -4,7 +4,10 @@
[] → render blocks #} {% for block in post.content %} {% if block.type ==
"image" %} {% with src=url_for('content_image_files', filename=block.src) %}
{% include "components/image.html" %} {% endwith %} {% elif block.type ==
"text" %} {{ block.value | safe }} {% endif %} {% endfor %} {% else %} {#
content is """...""" → render HTML #} {{ post.content | safe }} {% endif %}
"text" %} {{ block.value | safe }} {% endif %}{% elif block.type == "code" %}
{% with value=block.src %} {% include "components/code.html" %} {% endwith %}
{% elif block.type == "text" %} {{ block.value | safe }} {% endif %} {% endfor
%} {% else %} {# content is """...""" → render HTML #} {{ post.content | safe
}} {% endif %}
</article>
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %}