mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 17:16:31 -05:00
57 lines
2.1 KiB
HTML
57 lines
2.1 KiB
HTML
{{ define "main"}}
|
|
<article class="h-entry">
|
|
<h1 class='title p-name'>{{ .Title }}</h1>
|
|
{{ partial "header.html" . }}
|
|
<!-- date -->
|
|
{{ if not .Date.IsZero }}
|
|
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
|
<p class="date">Published on <time class="dt-published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z0700" }}'>{{ .Date.Format $singlePageDateFormat }}</time></p>
|
|
<a style="display: none" class="u-url" href="{{ .Permalink }}"></a>
|
|
{{ end }}
|
|
<!-- tags -->
|
|
<div id="tags">
|
|
<ul>
|
|
{{ range .Param "tags" }}
|
|
{{ $name := . }}
|
|
{{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }}
|
|
<li><a class="p-category" href="{{ .Permalink }}">{{ $name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
<!-- content -->
|
|
<div id="contentBody" class="e-content">
|
|
{{ .Content }}
|
|
</div>
|
|
</article>
|
|
<!-- Webmentions -->
|
|
<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>
|
|
{{ $webmentionjs := resources.Get "js/webmention.min.js" }}
|
|
<script src="{{ $webmentionjs.Permalink }}" async></script>
|
|
<!-- Metadata -->
|
|
<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 }}",
|
|
"url": "{{ .Site.BaseURL }}",
|
|
"email": "mailto://{{ .Site.Params.email }}",
|
|
"image": "{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}"
|
|
}]
|
|
}
|
|
</script>
|
|
{{ partial "footer.html" . }}
|
|
{{ end }}
|