mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 09:02:29 +00:00
Tweak theme
This commit is contained in:
55
themes/custom-theme/layouts/partials/head/seo.html
Normal file
55
themes/custom-theme/layouts/partials/head/seo.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{{ if eq .Kind "404" }}
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
{{ else }}
|
||||
{{ with .Params.robots }}
|
||||
<meta name="robots" content="{{ . }}" />
|
||||
{{ else }}
|
||||
<meta
|
||||
name="robots"
|
||||
content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $title := .Title }}
|
||||
{{ if .IsHome }}
|
||||
{{ $title = .Site.Title }}
|
||||
{{ with .Site.Params.Subtitle }}
|
||||
{{ $title = printf "%s — %s" $title . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<meta
|
||||
name="description"
|
||||
content="
|
||||
{{- with .Description -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
{{- with .Summary | plainify -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
{{- .Site.Params.description -}}
|
||||
{{- end -}}
|
||||
{{- end -}}"
|
||||
/>
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<!-- Internal Hugo templates -->
|
||||
<!-- See https://gohugo.io/templates/internal -->
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
|
||||
|
||||
<!-- RSS feed -->
|
||||
<!-- See https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head -->
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link
|
||||
rel="{{ .Rel }}"
|
||||
type="{{ .MediaType.Type }}"
|
||||
href="{{ .RelPermalink }}"
|
||||
title="{{ $.Site.Title }}"
|
||||
/>
|
||||
{{ end }}
|
Reference in New Issue
Block a user