+ Proper open graph tags

This commit is contained in:
shockrah 2021-08-16 23:10:44 -07:00
parent bf32ad058e
commit 4ab8f53144
5 changed files with 9 additions and 13 deletions

View File

@ -3,7 +3,6 @@
{{ range .Pages.ByPublishDate.Reverse }}
<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" }}
<a class="summary" href="{{ .RelPermalink }}">
<p>{{ .Summary }}</p>
</a>

View File

@ -1,6 +1,5 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "metadata.html" }}
<br><br>
{{ .Content }}
{{ end }}

View File

@ -7,4 +7,13 @@
{{ $title := print .Title }}
{{ if .IsHome }}{{ $title = .Site.Title}}{{end}}
<title>{{ $title }}</title>
<meta property="og:title" content="{{ $title }}">
<meta property="og:site_name" content="Shockrah's not-a-blog">
{{ $url := print .RelPermalink }}
<meta property="og:url" content="https://shockrah.xyz">
{{ $desc := print .Description }}
{{ if .IsHome }}{{ $desc = .Params.Description }}{{end}}
<meta property="og:description" content="{{ $desc }}">
<meta property="og:type" content="website">
<meta property="og:image" content="/favicon.png">
</head>

View File

@ -1,10 +0,0 @@
{{ $dateTime := .PublishDate.Format "2017-01-01" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
{{ with .Params.tags }}
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
{{ end }}

View File

@ -3,7 +3,6 @@
{{ range .Pages.ByPublishDate.Reverse }}
<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" }}
<a class="summary" href="{{ .RelPermalink }}">
<p>{{ .Summary }}</p>
</a>