diff options
author | de-souza <43355143+de-souza@users.noreply.github.com> | 2020-03-06 19:23:24 +0300 |
---|---|---|
committer | de-souza <43355143+de-souza@users.noreply.github.com> | 2020-03-06 19:23:24 +0300 |
commit | 1a08fc62f2a8e8c7751c85029960777b59b941ee (patch) | |
tree | 3045d0abfa8f4106c035b3a4428484ac41caf6ec | |
parent | 673e34c6d356ebd3dadfb244fc72166dea031705 (diff) |
Use same logic as official internal templates
-rw-r--r-- | layouts/_default/baseof.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index eb891fc..b5279a0 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,13 +3,17 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - {{ if .Summary }} + {{ with .Description }} + <meta name="description" content="{{ . }}"> + {{ else }} + {{ if .IsPage }} <meta name="description" content="{{ .Summary }}"> {{ else }} - {{ with site.Params.description }} + {{ with .Site.Params.description }} <meta name="description" content="{{ . }}"> {{ end }} {{ end }} + {{ end }} {{ hugo.Generator }} {{ if site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end }} {{ if site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }} |