2020-01-15 22:07:43 -05:00
|
|
|
{{ define "main"}}
|
2022-02-15 01:13:11 -05:00
|
|
|
<article class="h-entry">
|
2022-05-08 16:11:05 -04:00
|
|
|
{{ .Scratch.Set "customTitleHeaderSet" true }}
|
|
|
|
{{ .Scratch.Set "customTitleHeader" "Blog" }}
|
|
|
|
{{ .Scratch.Set "customTitleHeaderLink" "/blog" }}
|
2020-01-15 22:07:43 -05:00
|
|
|
{{ partial "header.html" . }}
|
2022-05-08 16:11:05 -04:00
|
|
|
<main>
|
|
|
|
<h1 class='title'>{{ .Title }}</h1>
|
2022-05-05 21:07:54 -04:00
|
|
|
<a style="display: none" class="u-url" href="{{ .Permalink }}"></a>
|
2020-01-15 22:07:43 -05:00
|
|
|
<!-- date -->
|
2020-12-22 09:36:03 -05:00
|
|
|
{{ if not .Date.IsZero }}
|
2020-01-15 22:07:43 -05:00
|
|
|
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
2022-05-05 21:07:54 -04:00
|
|
|
{{ $pubdate := .Date.Format $singlePageDateFormat }}
|
|
|
|
<p class="date">Published on <time class="dt-published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z0700" }}'>{{ $pubdate }}</time></p>
|
|
|
|
{{- if .Lastmod }}
|
|
|
|
{{- $lastmod := .Lastmod.Format $singlePageDateFormat }}
|
|
|
|
{{- if ne $lastmod $pubdate }}
|
|
|
|
<p class="date-updated">Updated on <time class='dt-updated' datetime='{{ .Lastmod.Format "2006-01-02T15:04:05Z0700" }}'>{{ $lastmod }}</time></p>
|
|
|
|
{{- end }}
|
|
|
|
{{ end }}
|
2020-12-22 09:36:03 -05:00
|
|
|
{{ end }}
|
2022-05-05 21:29:17 -04:00
|
|
|
{{ $readTime := mul (div (countwords .Content) 220.0) 60 }}
|
|
|
|
{{ if gt $readTime 60 }}
|
|
|
|
<p>
|
|
|
|
Reading Time:
|
2022-05-05 21:32:07 -04:00
|
|
|
{{ math.Ceil (div $readTime 60) }} minutes.
|
2022-05-05 21:29:17 -04:00
|
|
|
</p>
|
|
|
|
{{ end }}
|
2020-02-16 17:29:11 -05:00
|
|
|
<!-- tags -->
|
|
|
|
<div id="tags">
|
|
|
|
<ul>
|
|
|
|
{{ range .Param "tags" }}
|
|
|
|
{{ $name := . }}
|
|
|
|
{{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }}
|
2022-02-15 01:13:11 -05:00
|
|
|
<li><a class="p-category" href="{{ .Permalink }}">{{ $name }}</a></li>
|
2020-02-16 17:29:11 -05:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-01-15 22:07:43 -05:00
|
|
|
<!-- content -->
|
2022-02-15 01:13:11 -05:00
|
|
|
<div id="contentBody" class="e-content">
|
2020-01-15 22:07:43 -05:00
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
2022-02-15 01:13:11 -05:00
|
|
|
</article>
|
2022-05-02 00:04:58 -04:00
|
|
|
<!-- Webmentions -->
|
2022-05-01 01:06:44 -04:00
|
|
|
<div id="webmentions"></div>
|
|
|
|
<form method="post" action="https://webmention.io/brandonrozek.com/webmention">
|
|
|
|
<p>Have you published a response to this? <label for="webmention-source">Let me know the <abbr title="Uniform Resource Locator">URL</abbr></label>:</p>
|
|
|
|
<input type="url" name="source" id="webmention-source">
|
|
|
|
<input type="hidden" name="target" value="{{ .Permalink }}">
|
|
|
|
<button type="submit">Ping!</button>
|
|
|
|
</form>
|
2022-05-08 16:11:05 -04:00
|
|
|
</main>
|
2022-05-01 01:06:44 -04:00
|
|
|
{{ $webmentionjs := resources.Get "js/webmention.min.js" }}
|
|
|
|
<script src="{{ $webmentionjs.Permalink }}" async></script>
|
2022-05-02 00:04:58 -04:00
|
|
|
<!-- Metadata -->
|
2022-02-15 01:13:11 -05:00
|
|
|
<script type="application/ld+json">
|
|
|
|
{
|
|
|
|
"@context": "https://schema.org",
|
|
|
|
"@type": "NewsArticle",
|
|
|
|
"headline": "{{ .Title }}",
|
|
|
|
"image": [
|
|
|
|
"{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}"
|
|
|
|
],
|
|
|
|
"datePublished": "{{ .Date.Format "2006-01-02" }}",
|
|
|
|
"author": [{
|
|
|
|
"@type": "Person",
|
|
|
|
"name": "{{ .Site.Params.Author }}",
|
2022-02-17 14:09:01 -05:00
|
|
|
"url": "{{ .Site.BaseURL }}",
|
|
|
|
"email": "mailto://{{ .Site.Params.email }}",
|
|
|
|
"image": "{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}"
|
2022-02-15 01:13:11 -05:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
</script>
|
2020-01-15 22:07:43 -05:00
|
|
|
{{ partial "footer.html" . }}
|
|
|
|
{{ end }}
|