diff --git a/layouts/partials/head/seo/seo.html b/layouts/partials/head/seo/seo.html new file mode 100644 index 0000000..bcc2e84 --- /dev/null +++ b/layouts/partials/head/seo/seo.html @@ -0,0 +1,67 @@ + +{{ if eq .Kind "404" -}} + +{{ else -}} + {{ with .Params.robots -}} + + {{ else -}} + + + + {{ end -}} +{{ end -}} + + + + + {{- if and .Page.IsNode .Page.Paginator -}} + {{- $paginator := .Paginate .RegularPagesRecursive }} + {{- with $paginator -}} + {{ if and (gt $paginator.TotalPages 1) (gt $paginator.PageNumber 1) }} + | Page {{ $paginator.PageNumber }} + {{- end -}} + {{- end -}} + {{- end -}} + {{- with .Params.seo_title -}} + {{- . -}} + {{- else -}} + {{- .Title -}} + {{- end -}} + {{ if (or (and (ne .Type "posts") (ne .Type "projects") (not .IsHome)) (and (not .IsPage) (not .IsHome))) }} | {{ .Site.Title -}}{{ end -}} + + + +{{ with .Params.author -}} + +{{ else -}} + +{{ end -}} + + +{{ with .Description -}} + +{{ else -}} + +{{ end -}} + +{{ if $.Scratch.Get "paginator" }} + + {{ if .Paginator.HasPrev -}} + + {{ end -}} + {{ if .Paginator.HasNext -}} + + {{ end -}} +{{ else -}} + +{{ end -}} + +{{ partial "head/seo/opengraph.html" . }} +{{ partial "head/seo/twitter-cards.html" . }} + + +{{- with .OutputFormats.Get "rss" -}} +{{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{- end -}} + +{{ partial "head/seo/structured-data.html" . }}