mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +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
|
@ -111,7 +111,7 @@ disableKinds = ["taxonomy", "term"]
|
|||
baseName="atom"
|
||||
isPlainText = true
|
||||
mediaType = "application/xml"
|
||||
|
||||
|
||||
[outputformats.html]
|
||||
mediaType = "application/xhtml+xml"
|
||||
|
||||
|
|
|
@ -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