38 lines
1.6 KiB
HTML
38 lines
1.6 KiB
HTML
{{ define "head_meta" }}
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="{{ .Title }}" />
|
|
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
|
<meta property="og:url" content="{{ .Permalink }}" />
|
|
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format "2006-01-02T15:04:05-07:00" | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
|
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format "2006-01-02T15:04:05-07:00" | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
|
{{ $thumb := $.Resources.Get $.Params.featured_image -}}
|
|
{{ with $thumb }}<meta property="og:image" content="{{ (.Fit "1024x1024").Permalink }}" />{{end}}
|
|
{{end}}
|
|
|
|
{{ define "main" }}
|
|
<article class="single post">
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
<p>
|
|
{{- .Content -}}
|
|
</p>
|
|
</article>
|
|
|
|
<div class="comments">
|
|
<div id="disqus_thread"></div>
|
|
<script>
|
|
var disqus_config = function () {
|
|
this.page.url = '{{.Permalink}}';
|
|
this.page.identifier = '{{.File.ContentBaseName}}';
|
|
};
|
|
|
|
(function() {
|
|
var d = document, s = d.createElement('script');
|
|
s.src = 'https://multimote.disqus.com/embed.js';
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
(d.head || d.body).appendChild(s);
|
|
})();
|
|
</script>
|
|
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
</div>
|
|
{{ end }} |