-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.liquid
38 lines (35 loc) · 1.5 KB
/
post.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% include "head.liquid" %}
{% assign content = page.content %}
{% include "reading_time.liquid" %}
<div class="content container">
<div class="post">
<span class="post-date">
{% if page.previous %}
<a class="label" href="/{{page.previous.permalink}}">« {{page.previous.title}}</a>
{% endif %}
<a class="label" href="{{ "/" }}">up</a>
{% if page.next %}
<a class="label" href="/{{page.next.permalink}}">{{page.next.title}} »</a>
{% endif %}
</span>
<h1 class="post-title">{{ page.title }}</h1>
<span class="post-date">{% if page.is_draft %}Unpublished draft{% else %}{{ page.published_date | date: "%-d %B %Y" }}{% endif %} · {{ reading_time }} read{% if site.data.params.utterances %} · <a href="#comments">Comments</a>{% endif %}
{% comment %}if post.categories.count > 0{% endcomment %}
<br/>
{% for cat in page.categories %}<a class="label" href="{{ "/categories/" }}{{ cat | escape }}">{{ cat }}</a>{% endfor %}
</span>
{{ page.content }}
</div>
{% if site.data.params.utterances %}
<div id="comments">
<script src="https://utteranc.es/client.js"
repo="{{ site.data.params.utterances }}"
issue-term="{{ site.data.params.utterancesMapping }}"
theme="{{ site.data.params.utterancesTheme }}"
crossorigin="anonymous"
async>
</script>
</div>
{% endif %}
</div>
{% include "foot.liquid" %}