2018-07-20 16:45:42 +01:00
|
|
|
{% extends "base.j2.html" %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2019-01-31 21:23:16 +00:00
|
|
|
{% block lang %} lang="{{ post.lang }}" {% endblock %}
|
|
|
|
|
|
|
|
{% block title %}{{ post.title }} - {{ site.domain }}{% endblock %}
|
|
|
|
|
2018-07-20 16:45:42 +01:00
|
|
|
{% block meta %}
|
|
|
|
<meta name="author" content="{{ author.name }} <{{ author.email }}>" />
|
|
|
|
<meta name="description" content="{{ post.summary|e }}" />
|
|
|
|
<link rel="canonical" href="{{ post.url }}" />
|
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
|
|
|
{% if post.has_code %}
|
|
|
|
<style media="all">
|
|
|
|
{% include 'prism.css' %}
|
|
|
|
</style>
|
2018-08-04 09:30:26 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2018-08-04 09:30:26 +01:00
|
|
|
{% block prism %}
|
|
|
|
{% if post.has_code %}
|
|
|
|
<script>
|
|
|
|
{% include 'prism.js' %}
|
|
|
|
</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
|
|
|
|
2018-11-10 20:49:13 +00:00
|
|
|
{% block licence %}
|
|
|
|
<link rel="license" href="https://spdx.org/licenses/{{ post.licence }}.html" type="{{ post.licence }}" />
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if post.event %}
|
|
|
|
{% set mftype = 'h-entry h-event' %}
|
|
|
|
{% else %}
|
|
|
|
{% set mftype = 'h-entry' %}
|
|
|
|
{% endif %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<main role="main" vocab="http://schema.org/" typeof="Blog WebPage">
|
|
|
|
<article class="{{ mftype }} hentry singular" lang="{{ post.lang }}" property="blogPost" typeof="BlogPosting">
|
2019-01-21 16:10:27 +00:00
|
|
|
<header>
|
2019-02-03 16:40:08 +00:00
|
|
|
<h1 class="entry-title p-name" property="headline">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if post.is_reply %}
|
|
|
|
<span>
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-reply" />
|
|
|
|
</svg>
|
|
|
|
<a href="{{ post.url }}">
|
|
|
|
RE:
|
|
|
|
</a>
|
2019-01-31 21:23:16 +00:00
|
|
|
<a href="{{ post.is_reply }}" class="u-in-reply-to">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.is_reply }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% else %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a href="{{ post.url }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
<span>{{ post.title }}</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if post.review %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<div class="h-review hreview" property="review" typeof="http://schema.org/Review">
|
2019-01-31 21:23:16 +00:00
|
|
|
<strong>Review summary of: <a href="{{ post.review.url }}" class="item fn p-name u-url p-item h-product">{{ post.review.title }}</a></strong>
|
2019-01-21 16:10:27 +00:00
|
|
|
<p>
|
|
|
|
By
|
2019-02-03 16:40:08 +00:00
|
|
|
<span class="p-author h-card vcard reviewer" property="author" typeof="Person">
|
|
|
|
<a class="fn p-name url u-url u-uid" href="{{ author.url }}" property="url">
|
|
|
|
<span property="name">{{ author.name }}</span>
|
|
|
|
</a></span> at <time class="dt-published dtreviewed" datetime="{{ post.pubtime }}" property="datePublished">{{ post.pubdate }}</time>
|
2019-01-21 16:10:27 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2019-02-03 16:40:08 +00:00
|
|
|
<span class="rating" property="reviewRating" itemscope typeof="Rating">
|
|
|
|
<meta property="worstRating" content = "1">
|
|
|
|
<span class="value" property="ratingValue">{{ post.review.rated }}</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
out of
|
2019-02-03 16:40:08 +00:00
|
|
|
<span class="best" property="bestRating">{{ post.review.outof }}</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
</span>
|
|
|
|
</p>
|
2019-02-03 16:40:08 +00:00
|
|
|
<p class="p-summary summary" property="reviewBody">{{ post.review.summary }}</p>
|
2019-01-21 16:10:27 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if post.summary %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<div class="e-summary entry-summary" property="description">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.html_summary }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-02-03 16:40:08 +00:00
|
|
|
<div class="e-content entry-content" property="articleBody">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.html_content }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<footer>
|
2019-02-03 16:40:08 +00:00
|
|
|
{% if not post.enclosure %}
|
|
|
|
<img aria-hidden="true" hidden="hidden" class="u-featured hidden" property="image" src="{{ author.avatar }}" />
|
|
|
|
{% else %}
|
|
|
|
<img aria-hidden="true" hidden="hidden" class="u-featured hidden" property="image" src="{{ post.enclosure.url }}" />
|
|
|
|
{% endif %}
|
2019-01-21 16:10:27 +00:00
|
|
|
<dl>
|
|
|
|
{% if post.event %}
|
|
|
|
<dt>Trip details</dt>
|
|
|
|
<dd>
|
|
|
|
From
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-start dtstart" datetime="{{ post.event.starttime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.startdate }}
|
|
|
|
</time>
|
|
|
|
to
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-end dtend" datetime="{{ post.event.endtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.enddate }}
|
|
|
|
</time>, in
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-location location">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.location }}
|
|
|
|
</span>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<dt>Author</dt>
|
2019-02-03 16:40:08 +00:00
|
|
|
<dd>
|
|
|
|
<span class="p-author h-card vcard" property="author" typeof="Person">
|
|
|
|
<img class="photo avatar u-photo u-avatar"
|
|
|
|
src="{{ author.avatar }}"
|
|
|
|
alt="Photo of {{ author.name }}"
|
|
|
|
property="image" />
|
|
|
|
<a class="fn p-name url u-url u-uid org"
|
|
|
|
href="{{ author.url }}"
|
|
|
|
property="url">
|
|
|
|
<span property="name">{{ author.name }}</span>
|
|
|
|
</a>
|
|
|
|
<a class="u-email email" href="mailto:{{ author.email }}">
|
|
|
|
{{ author.email }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<span aria-hidden="true" hidden="hidden" property="publisher" typeof="Organization">
|
|
|
|
<span property="name">{{ site.domain }}</span>
|
|
|
|
<a href="{{ site.url }}" property="url">{{ site.url }}</a>
|
|
|
|
<span property="logo" typeof="ImageObject">
|
|
|
|
<img src="{{ author.avatar }}" alt="" property="url" />
|
2019-01-21 16:10:27 +00:00
|
|
|
</span>
|
2019-02-03 16:40:08 +00:00
|
|
|
</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Published</dt>
|
|
|
|
<dd class="published updated">
|
|
|
|
<time class="dt-published dt-updated"
|
|
|
|
datetime="{{ post.pubtime }}"
|
2019-02-03 16:40:08 +00:00
|
|
|
property="dateModified datePublished"
|
2019-01-21 16:10:27 +00:00
|
|
|
>{{ post.pubdate }}</time>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt>License</dt>
|
|
|
|
<dd class="license">
|
|
|
|
{% if post.licence == 'CC-BY-4.0' %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by/4.0/" class="u-license" property="license">
|
2019-01-31 21:23:16 +00:00
|
|
|
{{ post.licence }}
|
|
|
|
</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>
|
|
|
|
{% elif post.licence == 'CC-BY-NC-4.0' %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/" class="u-license" property="license">
|
2019-01-31 21:23:16 +00:00
|
|
|
{{ post.licence }}
|
|
|
|
</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.
|
|
|
|
{% elif post.licence == 'CC-BY-NC-ND-4.0' %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="u-license" property="license">
|
2019-01-31 21:23:16 +00:00
|
|
|
{{ post.licence }}
|
|
|
|
</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-03 16:40:08 +00:00
|
|
|
<a class="u-url u-uuid" href="{{ post.url }}" property="url">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.url }}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
{% if not post.is_page %}
|
|
|
|
{% if post.syndicate|length %}
|
|
|
|
<section class="syndication">
|
|
|
|
{% for url in post.syndicate %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a href="{{ url }}" class="u-syndication"></a>
|
2019-01-21 16:10:27 +00:00
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<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-01-21 16:10:27 +00:00
|
|
|
{% for provider, info in author.tips.items() %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<span typeof="DonateAction" property="potentialAction">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if loop.last and not loop.first %} or {% endif %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<a property="url" href="{{ info.url }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-{{ provider }}"></use>
|
|
|
|
</svg> {{ info.text }}</a>
|
|
|
|
{% if not loop.last and not loop.first %}, {% endif %}
|
2019-02-03 16:40:08 +00:00
|
|
|
<span aria-hidden="true" hidden="hidden" property="recipient" typeof="Person">
|
|
|
|
for
|
|
|
|
<span property="name">{{ author.name }}</span>
|
|
|
|
(<span property="email">{{ author.email }}</span>)
|
|
|
|
</span>
|
|
|
|
</span>
|
2019-01-21 16:10:27 +00:00
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{% if post.replies|length %}
|
|
|
|
<section class="replies">
|
|
|
|
<h2><a id="replies"></a>Replies</h2>
|
|
|
|
<ol>
|
|
|
|
{% for mtime, comment in post.replies.items() %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<li class="h-entry p-comment">
|
|
|
|
<time class="dt-published" datetime="{{ comment.pubtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.pubdate }}
|
|
|
|
</time> 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 %}
|
|
|
|
</span><br />
|
|
|
|
<span class="source">
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-link"></use>
|
|
|
|
</svg>
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-url" href="{{ comment.source }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.source }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if post.reactions|length %}
|
|
|
|
<section class="reactions">
|
|
|
|
<h2><a id="reactions"></a>Reactions</h2>
|
|
|
|
<dl>
|
|
|
|
{% for character, comments in post.reactions.items() %}
|
|
|
|
<dt>{{ character }}</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
{% for mtime, comment in comments.items() %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<li class="h-entry p-comment">
|
2019-01-21 16:10:27 +00:00
|
|
|
<span class="reaction">
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-url" href="{{ comment.source }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.type }}
|
|
|
|
</a>
|
|
|
|
</span>
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-published" datetime="{{ comment.pubtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.pubdate }}
|
|
|
|
</time> 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 %}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
{% endfor %}
|
|
|
|
</dl>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|