nourhans-blog/themes/blue/html/post.html
2026-08-26 17:50:14 +01:00

66 lines
2.7 KiB
HTML

{% extends "/html/base.html" %}
{%block subtitle %}: {{post.title}}{% endblock %}
{% block meta %}
<meta name="keywords" content="{% for tag in tags %}{{tag.name}}{% if not forloop.last %},{% endif %}{% endfor %}">
{% if post.description %}
<meta name="description" content="{{post.description}}">
{% comment %} OpenGraph tags {% endcomment %}
<meta property="og:description" content="{{post.description}}">
{% endif %}
{% if post.image %}
{% if post.image.path %}
<meta property="og:image" content="{{site-url}}{{blog-prefix}}{{post.image.path}}" />
{% if post.image.type %}
<meta property="og:image:type" content="{{post.image.type}}" />{% endif %}
{% if post.image.width %}
<meta property="og:image:width" content="{{post.image.width}}" />{% endif %}
{% if post.image.height %}
<meta property="og:image:height" content="{{post.image.height}}" />{% endif %}
{% if post.image.alt %}
<meta property="og:image:alt" content="{{post.image.alt}}" />{% endif %}
{% else %}
<meta property="og:image" content="{{site-url}}{{blog-prefix}}{{post.image}}" />{% endif %}
{% endif %}
<meta property="og:url" content="{{site-url}}{{uri}}" />
<meta property="og:title" content="{{post.title}}" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="{{site-url}}{{uri}}" />
<meta name="twitter:title" content="{{post.title}}" />
<meta name="twitter:description" content="{{post.description}}" />
{% if post.image %}
<meta name="twitter:image"
content="{{site-url}}{{blog-prefix}}{% if post.image.path %}{{post.image.path}}{% else %}{{post.image}}{% endif %}" />
{% endif %}
<meta name="twitter:creator" content="{{twitter-acct}}" />
{% endblock %}
{% block content %}
<div id="post">
{% include "/html/post-content.html" %}
<div id="prev-next">
{% if post.prev %}
<a href="{{post.prev.uri}}">&laquo; {{post.prev.title}}</a>
{% endif %}
{% if post.next %}
<a class="right" href="{{post.next.uri}}">{{post.next.title}} &raquo;</a>
{% endif %}
</div>
{% if disqus-shortname %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_config = function () {
this.page.url = "{{site-url}}{{uri}}";
this.page.identifier = "{{post.title}}";
};
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//{{disqus-shortname}}.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
{% endif %}
</div>
{% endblock %}