Skip to content

Commit c9f4971

Browse files
Merge branch 'google:main' into updateFontAwesome
2 parents 94e2843 + c657157 commit c9f4971

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

layouts/partials/head.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
{{ .Site.Title -}}
2222
{{ end -}}
2323
</title>
24-
{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}}
25-
<meta name="description" content="{{ $desc }}">
24+
<meta name="description" content="{{ template "partials/page-description.html" . }}">
2625
{{ template "_internal/opengraph.html" . -}}
2726
{{ template "_internal/schema.html" . -}}
2827
{{ template "_internal/twitter_cards.html" . -}}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ with .Description | plainify -}}
2+
{{ . -}}
3+
{{ else -}}
4+
{{ if .IsPage -}}
5+
{{ .Summary | plainify | chomp -}}
6+
{{ else -}}
7+
{{ with .Site.Params.description | plainify -}}
8+
{{ . -}}
9+
{{ end -}}
10+
{{ end -}}
11+
{{ end -}}

0 commit comments

Comments
 (0)