Skip to content

Commit

Permalink
Allow per-page customization of description/keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
chatziko authored and zjedi committed Jul 8, 2024
1 parent b411ea2 commit 8bc7135
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title>
{{ with or .Title .Site.Title | plainify }}
<title>{{ . }}</title>
{{ end }}

{{ with resources.Get .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ .RelPermalink }}" type="{{ .MediaType.Type }}" />{{ end }}

{{ with .Site.Params.description }}
{{ with or .Description .Site.Params.description | plainify }}
<meta name="description" content="{{ . }}"
/>{{ end }}
{{ with .Site.Params.meta.keywords }}
{{ with or (delimit .Keywords ", ") .Site.Params.meta.keywords }}
<meta name="keywords" content="{{ . }}"
/>{{ end }}
<meta name="referrer" content="no-referrer-when-downgrade" />
Expand Down

0 comments on commit 8bc7135

Please sign in to comment.