diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-16 08:54:23 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-16 08:54:23 +0200 |
| commit | 863df1c867d65883e4f3658593ef23e125058eb5 (patch) | |
| tree | b92303ae8c7f3c8368669ba01905487dccd7c6a3 /layouts | |
| parent | fb614f750299e6adabca2aec4f6872792b21a6c5 (diff) | |
| download | gohugo-theme-ed-863df1c867d65883e4f3658593ef23e125058eb5.tar.gz | |
Reduce description linght
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/description.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/description.html b/layouts/partials/description.html index ff3b697..b2100a8 100644 --- a/layouts/partials/description.html +++ b/layouts/partials/description.html @@ -12,4 +12,8 @@ {{- end -}} {{- end -}} -{{- replaceRE "\n" " " ($description | plainify | safeHTML | chomp | truncate 180) -}} +{{- /* Meta descriptions can technically be any length, but Google generally + truncates snippets to ~155-160 characters. It's best to keep meta descriptions + long enough that they're sufficiently descriptive, so we recommend descriptions + between 50 and 160 characters. */ -}} +{{- replaceRE "\n" " " ($description | plainify | safeHTML | chomp | truncate 160) -}} |
