/
post.html
87 lines (86 loc) · 2.84 KB
/
post.html
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
---
layout: default
eleventyComputed:
preloads:
-
as: font
type: font/woff2
href: "{{ fonts.mono.variants.medium.roman.url }}"
crossorigin: true
---
<article class="post prose rhythm">
<header class="post-header">
<dl class="post-date inline-list">
<div>
<dt class="screen-reader-only">Published</dt>
<dd>{% include "date.html" date: page.date, dateFormat: "MMMM DD, YYYY" %}</dd>
</div>
{% if lastUpdated %}
<div>
<dt>Updated</dt>
<dd>{% include "date.html" date: lastUpdated, dateFormat: "MMMM DD, YYYY" %}</dd>
</div>
{% endif %}
</dl>
<h1 class="post-title">{{ title }}</h1>
<ul class="post-tags" aria-label="Tags">
{%- for category in categories -%}
<li>
<a href="/tags/{{ category }}/" class="post-tag" aria-label="{{ category }}">
{{- category -}}
</a>
</li>
{%- endfor -%}
</ul>
</header>
<div class="rhythm">
{{ content }}
{%- if commentsId and featureFlags.enableComments -%}
<section id="comments" class="stack gap-10" data-comments-id="{{ commentsId }}">
<div class="stack gap-0">
<div class="comment-actions flex flex-wrap align-center justify-between gap-0">
<h2><span id="comments-count" aria-hidden="true"></span>Comments</h2>
<a
class="button comment-button"
href="https://github.com/{{ site.issues.owner }}/{{ site.issues.repo }}/issues/{{ commentsId }}"
target="_blank"
rel="noreferrer noopener"
>Comment on GitHub {% include "icon.html" icon: "external-link", width: "16", height: "16" %}</a
>
</div>
<p class="comments-explanation">
Comment system powered by the GitHub Issues API. You can learn more about
<a href="/blog/static-site-comments-github-issues/">how I built it</a> or
post a comment over on GitHub, and it'll show up below once you reload this page.
</p>
</div>
<div id="comments-wrapper">
<p id="comments-placeholder" class="text-center">Loading...</p>
</div>
</section>
{%- endif -%}
</div>
</article>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ page.url | toAbsoluteUrl }}"
},
"headline": {{ title | escape | toJson }},
"description": {{ description | strip | toJson }},
{% if openGraph.image %}
"image": ["{{ openGraph.image }}"],
{% endif %}
"datePublished": {{ page.date | toJson }},
{% if lastUpdated -%}
"dateModified": {{ lastUpdated | toJson }},
{% endif -%}
"author": {
"@type": "Person",
"name": "{{ site.author }}"
}
}
</script>