summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-07-12 12:17:06 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-07-12 12:17:06 +0200
commite27ee8bbdf33db710632e218650dbfabf3586867 (patch)
treee71de3d807ea9fb1f438da2bfc12770c73ff5607 /templates
parent1a0de6124cc95989c70b74b76f6d1978ab102c1f (diff)
Add blog-import template for rendering blog imports from JSON to website
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'templates')
-rw-r--r--templates/blog-import.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/blog-import.html b/templates/blog-import.html
new file mode 100644
index 0000000..4fa1002
--- /dev/null
+++ b/templates/blog-import.html
@@ -0,0 +1,17 @@
+{% extends "zola-docsascode-theme/templates/page.html" %}
+
+{% block content %}
+ {% set data = page.extra.blogimport %}
+ {% set post = load_data(path = data, format = "json") %}
+ <p style="background-color: #dddddd; padding: 1em;">
+ Imported from
+ <a href="https://beyermatthias.de/{{ post.slug }}">this blog article</a>
+ which was <b>created on {{ post.created | safe }}</b>
+ </p>
+
+ <hr>
+
+ <article>
+ {{ post.body | markdown | safe }}
+ </article>
+{% endblock content %}