1
0
Fork 0
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:
Rohan Kumar 2022-10-24 12:27:19 -07:00
parent 8358d7ac27
commit 28a29078d5
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 2 additions and 2 deletions

View file

@ -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 }}" />