-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.liquid
More file actions
122 lines (113 loc) · 4.06 KB
/
post.liquid
File metadata and controls
122 lines (113 loc) · 4.06 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
layout: default
---
{% assign year = page.date | date: '%Y' %}
{% assign tags = page.tags | join: '' %}
{% assign categories = page.categories | join: '' %}
{% assign url_beginning = page.url | slice: 0, 6 %}
{% if page._styles %}
<!-- Page/Post style -->
<style type="text/css">
{{ page._styles }}
</style>
{% endif %}
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-meta">
{{ site.data[site.active_lang].strings.post.created_in }}
{% include date_format.liquid format='long' date=page.date -%}
{%- if page.author -%}
{{- site.data[site.active_lang].strings.post.created_by }}
{{ page.author -}}
{%- endif -%}
{%- if page.last_updated -%}
, {{ site.data[site.active_lang].strings.post.last_updated }}
{% include date_format.liquid format='long' date=page.last_updated -%}
{%- endif %}
{% if page.meta %}• {{ page.meta }}{% endif %}
</p>
<p class="post-tags">
{% if url_beginning == '/blog/' %}
<a href="{{ year | prepend: '/blog/' | prepend: site.baseurl}}"> <i class="fa-solid fa-calendar fa-sm"></i> {{ year }} </a>
{% else %}
<i class="fa-solid fa-calendar fa-sm"></i> {{ year }}
{% endif %}
{% if tags != '' %}
·
{% for tag in page.tags %}
{% if url_beginning == '/blog/' %}
<a href="{{ tag | slugify | prepend: '/blog/tag/' | prepend: site.baseurl}}"> <i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }}</a>
{% else %}
<i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }}
{% endif %}
{% unless forloop.last %}
{% endunless %}
{% endfor %}
{% endif %}
{% if categories != '' %}
·
{% for category in page.categories %}
{% if url_beginning == '/blog/' %}
<a href="{{ category | slugify | prepend: '/blog/category/' | prepend: site.baseurl}}">
<i class="fa-solid fa-tag fa-sm"></i> {{ category -}}
</a>
{% else %}
<i class="fa-solid fa-tag fa-sm"></i> {{ category }}
{% endif %}
{% unless forloop.last %}
{% endunless %}
{% endfor %}
{% endif %}
</p>
</header>
<article class="post-content">
{% if page.toc and page.toc.beginning %}
<div id="table-of-contents">
{% toc %}
</div>
<hr>
{% endif %}
<div id="markdown-content">
{{ content }}
</div>
</article>
{% if page.citation %}
{% include citation.liquid %}
{% endif %}
{% if page.related_publications %}
<h2>{{ site.data[site.active_lang].strings.references }}</h2>
<div class="publications">
{% bibliography --group_by none --cited_in_order %}
</div>
{% endif %}
{% if site.related_blog_posts and site.related_blog_posts.enabled %}
{% if page.related_posts == null or page.related_posts %}
{% include related_posts.liquid %}
{% endif %}
{% endif %}
{% if site.disqus_shortname and page.disqus_comments %}
{% include disqus.liquid %}
{% endif %}
{% if site.giscus and page.giscus_comments %}
{% include giscus.liquid %}
{% endif %}
<nav style="display:flex; justify-content:space-between; margin-top:2rem; padding-top:1rem; border-top:1px solid var(--global-divider-color); font-size:0.9em;">
<div style="flex:1; text-align:left;">
{% if page.previous %}
<a href="{{ page.previous.url | relative_url }}" style="text-decoration:none; color:var(--global-text-color-light);">
<span style="font-size:1.2em;">◀</span> {{ page.previous.title }}
</a>
{% endif %}
</div>
<div style="flex:1; text-align:right;">
{% if page.next %}
<a href="{{ page.next.url | relative_url }}" style="text-decoration:none; color:var(--global-text-color-light);">
{{ page.next.title }} <span style="font-size:1.2em;">▶</span>
</a>
{% endif %}
</div>
</nav>
</div>