Start building a blog page

This commit is contained in:
2026-10-04 21:01:24 +01:00
parent e0f85235f2
commit 179a830fa9
10 changed files with 167 additions and 19 deletions
+64
View File
@@ -0,0 +1,64 @@
{% extends 'main.html' %}
{% block description %}{{ metadata.description }}{% endblock %}
{% block head %}
{% if metadata.gallery %}
<script>
document.addEventListener("DOMContentLoaded",function(){
post_gallery = new Viewer(document.getElementById('article'), {
'url': 'realsrc',
'title': false
});
});
</script>
{% endif %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": {{ metadata.title | tojson }},
"description": {{ metadata.description | tojson }},
"datePublished": "{{ metadata.date }}",
{% if metadata.updated %}
"dateModified": "{{ metadata.updated }}",
{% endif %}
"image": "https://{{ url }}/image/{{ metadata.image }}",
"author": {
"@type": "Person",
"name": "Jake Charman",
"url": "https://{{ url }}/"
},
"publisher": {
"@type": "Person",
"name": "Jake Charman",
"url": "https://{{ url }}/"
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://{{ url }}/writing/{{ metadata.id }}"
},
"url": "https://{{ url }}/writing/{{ metadata.id }}",
"inLanguage": "en-GB"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{"@type": "ListItem", "position": 1, "name": "Projects", "item": "https://{{url}}/projects/"},
{"@type": "ListItem", "position": 2, "name": {{ metadata.title | tojson }}, "item": "https://{{url}}/projects/{{ metadata.id }}"}
]
}
</script>
{% endblock %}
{% block content %}
<main>
<section id="article">
<h1>{{ metadata.title}} </h1>
<p>{{ metadata.date | human_date }}</p>
<hr />
{{post|safe}}
</section>
</main>
{% endblock %}