-
Notifications
You must be signed in to change notification settings - Fork 26
/
post.html
90 lines (89 loc) · 3.26 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
88
89
90
---
layout: default
eleventyComputed:
preloads:
-
as: font
type: font/woff2
href: "{{ fonts.mono.variants.roman.url }}"
crossorigin: true
---
<article class="post prose rhythm">
<header class="post-header">
<p class="post-date"><span class="screen-reader-only">Published </span>{% include "date.html" date: page.date, dateFormat: "MMMM DD, YYYY" %}{% if lastUpdated %} • Updated {% include "date.html" date: lastUpdated, dateFormat: "MMMM DD, YYYY" %}{% endif %}</p>
<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 -%}
<template id="comment-template">
<li>
<div class="post-comment stack gap-0">
<header class="post-comment-meta">
<img alt="" aria-hidden="true" class="post-comment-avatar circle">
<a class="post-comment-username" target="_blank" rel="noreferrer noopener"></a>
<span class="size-font-sm">commented <time></time></span>
<span class="pill post-comment-author" data-shape="round" data-size="sm">Author</span>
<span class="size-font-sm post-comment-edited">Edited</span>
</header>
<div class="post-comment-body rhythm"></div>
</div>
</li>
</template>
<section id="comments" class="stack gap-10" data-comments-id="{{ commentsId }}">
<div class="stack gap-0">
<div class="repel align-center gap-0">
<h2>Comments <span id="comments-count"></span></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
</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 on GitHub, and it'll show up below once you reload this page.
</p>
</div>
<p id="comments-placeholder" class="text-center">Loading...</p>
<ol class="stack gap-10" aria-live="polite"></ol>
</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>