mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Fix overly long meta descriptions
This commit is contained in:
parent
8358d7ac27
commit
28a29078d5
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@
|
|||
{{- else if .IsHome -}}
|
||||
{{- $description = .Site.Params.Description -}}
|
||||
{{- else if .Summary -}}
|
||||
{{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | safeHTML -}}
|
||||
{{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | truncate 160 | replaceRE ` ([^ ]*)?$` `` | safeHTML -}}
|
||||
{{- end -}}
|
||||
<meta name="description" content="{{ $description }}" />
|
||||
<meta name="author" content="{{ .Site.Author.name }}" />
|
||||
|
|
Loading…
Reference in a new issue