Make title look nicer

alternate-navbar
Maik de Kruif 3 years ago
parent c79a95ffd4
commit 9f3d374645
Signed by: maik
GPG Key ID: 44A55AD1F0673FA6
  1. 5
      themes/maik-blog/layouts/partials/head.html
  2. 5
      themes/maik-blog/layouts/partials/meta-tags.html

@ -45,7 +45,10 @@
{{- if .IsHome }} {{- if .IsHome }}
{{- $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }} {{- $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
{{- else }} {{- else }}
{{- .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }} {{- .Title }}
{{- with .Params.Subtitle }} // {{ . }}
{{- end }} :: {{ $.Site.Title }}
{{- with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
{{- end -}} {{- end -}}
</title> </title>
{{- end }} {{- end }}

@ -11,7 +11,7 @@
<meta property="og:site_name" content="{{ .Site.Title }}" /> <meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}" /> <meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}" />
<meta property="og:title" <meta property="og:title"
content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Params.title | plainify }}{{ end }}" /> content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Params.title | plainify }}{{- with .Params.Subtitle }} // {{ . }}{{ end }}{{ end }}" />
<meta property="og:description" <meta property="og:description"
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" /> content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:url" content="{{ .Permalink }}" />
@ -55,7 +55,8 @@
<meta name="twitter:image" content="{{ $img.Permalink }}" /> <meta name="twitter:image" content="{{ $img.Permalink }}" />
<meta name="twitter:image:alt" content="{{ .Params.title | plainify }}" /> <meta name="twitter:image:alt" content="{{ .Params.title | plainify }}" />
{{- end }} {{- end }}
<meta name="twitter:title" content="{{ .Title }}" /> <meta name="twitter:title"
content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Params.title | plainify }}{{- with .Params.Subtitle }} // {{ . }}{{ end }}{{ end }}" />
<meta name="twitter:description" <meta name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" /> content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
<meta name="twitter:url" content="{{ .Permalink }}" /> <meta name="twitter:url" content="{{ .Permalink }}" />

Loading…
Cancel
Save