Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwbetz-gh <zwbetz@gmail.com>2021-05-20 04:59:38 +0300
committerzwbetz-gh <zwbetz@gmail.com>2021-05-20 04:59:38 +0300
commit7210152413be93fe746dac5eb83200a33529b0f6 (patch)
tree8c91aca601e932fe7d63739ae3d53d1f96bf67cc
parentfa9968a3ed2ff11a41c36d76cf752f0aa1701e6a (diff)
meta description
-rw-r--r--layouts/partials/head.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1f83fd9..d22678a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -10,6 +10,10 @@
{{ with .Site.Params.homeMetaContent }}
<meta name="description" content="{{ . | plainify }}">
{{ end }}
+ {{ else }}
+ {{ $summary := trim (.Summary | plainify | htmlUnescape) "\n\r"
+ | default .Title }}
+ <meta name="description" content="{{ $summary }}">
{{ end }}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">