ungleich-staticcms/templates/macros/blog.html
Nico Schottelius 57d66eb0c1 init staticcms
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2019-09-24 20:30:38 +09:00

20 lines
530 B
HTML

{% macro render_blog_post(post, from_index=false) %}
<div class="blog-post">
{% if from_index %}
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else %}
<h2>{{ post.title }}</h2>
{% endif %}
<p class="meta">
written by
{% if post.twitter_handle %}
<a href="https://twitter.com/{{ post.twitter_handle
}}">{{ post.author or post.twitter_handle }}</a>
{% else %}
{{ post.author }}
{% endif %}
on {{ post.pub_date }}
</p>
{{ post.body }}
</div>
{% endmacro %}