diff --git a/templates/pages/content.html b/templates/pages/content.html index 0e4ef05159f6d5b0e7c7030eea5f08dd642211f1..1bfe16b7babf7c0cf58b1afa947e131285db3a74 100644 --- a/templates/pages/content.html +++ b/templates/pages/content.html @@ -17,4 +17,6 @@ {% endblock content %} </div> </section> + {% set related_taxonomy="aspekte" %} + {% include "pages/related_posts.html" %} {% endblock %} diff --git a/templates/pages/raw.html b/templates/pages/raw.html index e2d9395c41d8ef2be2c04a98e06c500d1d9df166..a9aacbd33da8959cfa683d2e39f59ad63c12bd59 100644 --- a/templates/pages/raw.html +++ b/templates/pages/raw.html @@ -2,4 +2,6 @@ {% block main %} {{ page.content | safe }} + {% set related_taxonomy="produkte" %} + {% include "pages/related_posts.html" %} {% endblock %} diff --git a/templates/pages/related_posts.html b/templates/pages/related_posts.html new file mode 100644 index 0000000000000000000000000000000000000000..514ffeb48f178dab8de3816d38cf08e9525fe57e --- /dev/null +++ b/templates/pages/related_posts.html @@ -0,0 +1,16 @@ +{% set blog_section = get_section(path="blog/_index.md") %} +<section class="section" resource="{{ blog_section.permalink }}" typeof="schema:Blog"> + <meta property="schema:publisher" href="https://teckids.org/" /> + <div class="container"> + <h2 class="title is-2">{{ title | default(value="Aus dem Teckids-Blog") }}</h2> + <div class="columns is-multiline is-same-height mt-4"> + {% for post in blog_section.pages %} + {% if related_taxonomy in post.taxonomies and page.title in post.taxonomies[related_taxonomy] %} + <div class="column is-one-third"> + {% include "blog/card.html" %} + </div> + {% else %}{% continue %}{% endif %} + {% endfor %} + </div> + </div> +</section>