2018-07-20 16:45:42 +01:00
|
|
|
{% extends "base.j2.html" %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% macro includefile(fname) %}
|
|
|
|
{% include fname %}
|
|
|
|
{% endmacro %}
|
2019-01-31 21:23:16 +00:00
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% block lang %} lang="{{ post.inLanguage }}" {% endblock %}
|
|
|
|
|
|
|
|
{% block title %}{{ post.headline }} - {{ site.name }}{% endblock %}
|
2019-01-31 21:23:16 +00:00
|
|
|
|
2018-07-20 16:45:42 +01:00
|
|
|
{% block meta %}
|
2019-02-07 19:27:15 +00:00
|
|
|
<meta name="author" content="{{ post.author.name }} ({{ post.author.email }})" />
|
|
|
|
<meta name="description" content="{{ post.description|striptags|e }}" />
|
2018-07-20 16:45:42 +01:00
|
|
|
<link rel="canonical" href="{{ post.url }}" />
|
2019-02-07 19:27:15 +00:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{{ post|tojson(indent=4) }}
|
|
|
|
</script>
|
|
|
|
{% if post['@type'] == 'TechArticle' %}
|
Back To Pandoc
So, Python Markdown is a bottomless pit of horrors, including crippling parsing bugs,
random out of nowhere, lack of features. It's definitely much faster, than
Pandoc, but Pandoc doesn't go full retard where there's a regex in a fenced code block,
that happens to be a regex for markdown elements.
Also added some ugly post string replacements to make Pandoc fenced code output work
with Prism:
instead of the Pandoc <pre class="codelang"><code>, Prism wants
<pre><code class="language-codelang>, so I added a regex sub, because it's 00:32.
2018-08-04 00:28:55 +01:00
|
|
|
<style media="all">
|
2019-02-07 19:27:15 +00:00
|
|
|
{{ includefile('prism.css')|indent(8) }}
|
Back To Pandoc
So, Python Markdown is a bottomless pit of horrors, including crippling parsing bugs,
random out of nowhere, lack of features. It's definitely much faster, than
Pandoc, but Pandoc doesn't go full retard where there's a regex in a fenced code block,
that happens to be a regex for markdown elements.
Also added some ugly post string replacements to make Pandoc fenced code output work
with Prism:
instead of the Pandoc <pre class="codelang"><code>, Prism wants
<pre><code class="language-codelang>, so I added a regex sub, because it's 00:32.
2018-08-04 00:28:55 +01:00
|
|
|
</style>
|
2018-08-04 09:30:26 +01:00
|
|
|
{% endif %}
|
2019-02-07 19:27:15 +00:00
|
|
|
|
|
|
|
<meta property="og:title" content="{{ post.headline }}" />
|
|
|
|
<meta property="og:type" content="article" />
|
|
|
|
<meta property="og:url" content="{{ post.url }}" />
|
|
|
|
<meta property="og:description" content="{{ post.description|striptags|e }}" />
|
|
|
|
<meta property="article:published_time" content="{{ post.datePublished }}" />
|
|
|
|
<meta property="article:modified_time" content="{{ post.dateModified }}" />
|
|
|
|
<meta property="article:author" content="{{ post.author.name }} ({{ post.author.email}})" />
|
|
|
|
{% if post.image.url is defined %}
|
|
|
|
<meta property="og:image" content="{{ post.image.url }}" />
|
|
|
|
<meta property="og:image:type" content="{{ post.image.encodingFormat }}" />
|
|
|
|
<meta property="og:image:width" content="{{ post.image.width }}" />
|
|
|
|
<meta property="og:image:height" content="{{ post.image.height }}" />
|
|
|
|
{% else %}
|
|
|
|
<meta property="og:image" content="{{ post.image }}" />
|
|
|
|
{% endif %}
|
2018-08-04 09:30:26 +01:00
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2018-08-04 09:30:26 +01:00
|
|
|
{% block prism %}
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if post['@type'] == 'TechArticle' %}
|
2018-08-04 09:30:26 +01:00
|
|
|
<script>
|
2019-02-07 19:27:15 +00:00
|
|
|
{{ includefile('prism.js')|indent(8) }}
|
2018-08-04 09:30:26 +01:00
|
|
|
</script>
|
Back To Pandoc
So, Python Markdown is a bottomless pit of horrors, including crippling parsing bugs,
random out of nowhere, lack of features. It's definitely much faster, than
Pandoc, but Pandoc doesn't go full retard where there's a regex in a fenced code block,
that happens to be a regex for markdown elements.
Also added some ugly post string replacements to make Pandoc fenced code output work
with Prism:
instead of the Pandoc <pre class="codelang"><code>, Prism wants
<pre><code class="language-codelang>, so I added a regex sub, because it's 00:32.
2018-08-04 00:28:55 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if post.event %}
|
2019-02-07 19:27:15 +00:00
|
|
|
{% set mftype = 'h-entry hentry h-event hevent' %}
|
2019-01-21 16:10:27 +00:00
|
|
|
{% else %}
|
2019-02-07 19:27:15 +00:00
|
|
|
{% set mftype = 'h-entry hentry' %}
|
2019-01-21 16:10:27 +00:00
|
|
|
{% endif %}
|
2019-02-07 19:27:15 +00:00
|
|
|
<main>
|
|
|
|
<article class="{{ mftype }}" lang="{{ post.inLanguage }}" id="article">
|
2019-01-21 16:10:27 +00:00
|
|
|
<header>
|
2019-02-07 19:27:15 +00:00
|
|
|
<h1 class="entry-title p-name">
|
|
|
|
{% if post.mentions %}
|
2019-01-21 16:10:27 +00:00
|
|
|
<span>
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-reply" />
|
|
|
|
</svg>
|
|
|
|
<a href="{{ post.url }}">
|
|
|
|
RE:
|
|
|
|
</a>
|
2019-02-07 19:27:15 +00:00
|
|
|
<a href="{{ post.mentions.url }}" class="u-in-reply-to">
|
|
|
|
{{ post.mentions.url }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% else %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a href="{{ post.url }}">
|
2019-02-07 19:27:15 +00:00
|
|
|
{{ post.headline }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if post.review %}
|
2019-02-07 19:27:15 +00:00
|
|
|
<div class="h-review hreview">
|
|
|
|
<strong>Review summary of: <a href="{{ post.review.url }}" class="item fn p-name u-url p-item h-product">{{ post.review.name }}</a></strong>
|
2019-01-21 16:10:27 +00:00
|
|
|
<p>
|
|
|
|
By
|
2019-02-07 19:27:15 +00:00
|
|
|
<span class="p-author h-card vcard reviewer">
|
|
|
|
<a class="fn p-name url u-url u-uid" href="{{ post.author.url }}">
|
|
|
|
<span>{{ post.author.name }}</span>
|
|
|
|
</a></span> in <time class="dt-published dtreviewed" datetime="{{ post.datePublished }}">{{ post.copyrightYear }}</time>
|
2019-01-21 16:10:27 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2019-02-07 19:27:15 +00:00
|
|
|
<span class="rating">
|
|
|
|
<span class="value">{{ post.review.reviewRating.ratingValue }}</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
out of
|
2019-02-07 19:27:15 +00:00
|
|
|
<span class="best">{{ post.review.reviewRating.bestRating }}</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
</span>
|
|
|
|
</p>
|
2019-02-07 19:27:15 +00:00
|
|
|
<p class="p-summary summary">{{ post.review.text }}</p>
|
2019-01-21 16:10:27 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if post.description|length %}
|
|
|
|
<div class="e-summary entry-summary">
|
|
|
|
{{ post.description }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
<div class="e-content entry-content">
|
|
|
|
{{ post.text }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<dl>
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if post.subjectOf %}
|
2019-01-21 16:10:27 +00:00
|
|
|
<dt>Trip details</dt>
|
|
|
|
<dd>
|
|
|
|
From
|
2019-02-07 19:27:15 +00:00
|
|
|
<time class="dt-start dtstart" datetime="{{ post.subjectOf.startDate }}">
|
|
|
|
{{ post.subjectOf.startDate }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</time>
|
|
|
|
to
|
2019-02-07 19:27:15 +00:00
|
|
|
<time class="dt-end dtend" datetime="{{ post.subjectOf.endDate }}">
|
|
|
|
{{ post.subjectOf.endDate }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</time>, in
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-location location">
|
2019-02-07 19:27:15 +00:00
|
|
|
{{ post.subjectOf.location.name }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</span>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<dt>Author</dt>
|
2019-02-03 16:40:08 +00:00
|
|
|
<dd>
|
2019-02-07 19:27:15 +00:00
|
|
|
<span class="p-author h-card vcard">
|
2019-02-03 16:40:08 +00:00
|
|
|
<img class="photo avatar u-photo u-avatar"
|
2019-02-07 19:27:15 +00:00
|
|
|
src="{{ post.author.image }}"
|
|
|
|
alt="Photo of {{ post.author.name }}" />
|
|
|
|
<a class="fn p-name url u-url u-uid org" href="{{ post.author.url }}">
|
|
|
|
{{ post.author.name }}
|
2019-02-03 16:40:08 +00:00
|
|
|
</a>
|
2019-02-07 19:27:15 +00:00
|
|
|
<a class="u-email email" href="mailto:{{ post.author.email }}">
|
|
|
|
{{ post.author.email }}
|
2019-02-03 16:40:08 +00:00
|
|
|
</a>
|
|
|
|
</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Published</dt>
|
|
|
|
<dd class="published updated">
|
2019-02-07 19:27:15 +00:00
|
|
|
<time class="dt-published dt-updated" datetime="{{ post.datePublished }}">{{ post.datePublished|printdate }}</time>
|
2019-01-21 16:10:27 +00:00
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>License</dt>
|
|
|
|
<dd class="license">
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if 'CC-BY-4.0' in post.license %}
|
|
|
|
<a rel="license" href="{{ post.license }}" class="u-license">
|
|
|
|
CC-BY-4.0
|
2019-01-31 21:23:16 +00:00
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can republish it</li>
|
|
|
|
<li>you can modify it, but you need to indicate the modifications</li>
|
|
|
|
<li>you can use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
2019-02-07 19:27:15 +00:00
|
|
|
{% elif 'CC-BY-NC-4.0' in post.license %}
|
|
|
|
<a rel="license" href="{{ post.license }}" class="u-license">
|
|
|
|
CC-BY-NC-4.0
|
2019-01-31 21:23:16 +00:00
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can republish it</li>
|
|
|
|
<li>you can modify it, but you need to indicate the modifications</li>
|
|
|
|
<li>you can't use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
|
|
|
For commercial use, please contact me.
|
2019-02-07 19:27:15 +00:00
|
|
|
{% elif 'CC-BY-NC-ND-4.0' in post.license %}
|
|
|
|
<a rel="license" href="{{ post.license }}" class="u-license">
|
|
|
|
CC-BY-NC-ND-4.0
|
2019-01-31 21:23:16 +00:00
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can't modify it</li>
|
|
|
|
<li>you can't republish it</li>
|
|
|
|
<li>you can't use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
|
|
|
For commercial use, please contact me.
|
|
|
|
{% endif %}
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Entry URL</dt>
|
|
|
|
<dd>
|
2019-02-07 19:27:15 +00:00
|
|
|
<a class="u-url u-uuid" href="{{ post.url }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.url }}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if post.sameAs|length %}
|
|
|
|
<dt>Also on</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
{% for url in post.sameAs %}
|
|
|
|
<li>
|
|
|
|
<a class="u-syndication" href="{{ url }}">
|
|
|
|
{{ url }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-01-21 16:10:27 +00:00
|
|
|
</dl>
|
|
|
|
</footer>
|
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if 'WebPage' != post['@type'] %}
|
2019-01-21 16:10:27 +00:00
|
|
|
<section class="syndication">
|
2019-02-07 19:27:15 +00:00
|
|
|
{% for action in post.potentialAction %}
|
|
|
|
{% if 'InteractAction' == action['@type'] %}
|
|
|
|
<a href="{{ action.url }}"></a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2019-01-21 16:10:27 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="encourage">
|
|
|
|
<h2>Encourage creation!</h2>
|
|
|
|
<p>
|
2019-02-03 16:40:08 +00:00
|
|
|
If this entry helped you, or you simply liked it, leave a tip via <br />
|
2019-02-07 19:27:15 +00:00
|
|
|
{% set counters = {'donation': False} %}
|
|
|
|
{% for donate in post.potentialAction %}
|
|
|
|
{% if 'DonateAction' == donate['@type'] %}
|
|
|
|
{% if counters.donation %} or {% endif %}
|
|
|
|
<a href="{{ donate.url }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
<svg width="16" height="16">
|
2019-02-07 19:27:15 +00:00
|
|
|
<use xlink:href="#icon-{{ donate.name }}"></use>
|
|
|
|
</svg> {{ donate.description }}</a>
|
|
|
|
{% if counters.update({'donation': True}) %} {% endif %}
|
|
|
|
{% endif %}
|
2019-01-21 16:10:27 +00:00
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
|
2019-02-07 19:27:15 +00:00
|
|
|
{% if post.comment|length %}
|
|
|
|
<section class="comments">
|
|
|
|
<h2><a id="comments"></a>Responses</h2>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ol>
|
2019-02-07 19:27:15 +00:00
|
|
|
{% for comment in post.comment %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<li class="h-entry p-comment">
|
2019-02-07 19:27:15 +00:00
|
|
|
<span class="reaction">
|
|
|
|
<a class="u-url" href="{{ comment.url }}">
|
|
|
|
{{ comment.disambiguatingDescription }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
from
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-author h-card">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if comment.author.url %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="url u-url" href="{{ comment.author.url }}">
|
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2019-02-07 19:27:15 +00:00
|
|
|
</span>
|
|
|
|
at
|
|
|
|
<time class="dt-published" datetime="{{ comment.datePublished }}">
|
|
|
|
{{ comment.datePublished|printdate }}
|
|
|
|
</time>
|
|
|
|
<br />
|
2019-01-21 16:10:27 +00:00
|
|
|
<span class="source">
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-link"></use>
|
|
|
|
</svg>
|
2019-02-07 19:27:15 +00:00
|
|
|
<a class="u-url" href="{{ comment.url }}">
|
|
|
|
{{ comment.url }}
|
2019-01-21 16:10:27 +00:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|