add Open Graph tags (#8947)
This commit is contained in:
committed by
k8s-ci-robot
parent
d33aee9095
commit
d2ce897c08
@@ -14,8 +14,17 @@
|
|||||||
{{ end }}{{ else }}<!-- no custom css detected -->{{ end }}
|
{{ end }}{{ else }}<!-- no custom css detected -->{{ end }}
|
||||||
{{ if .Params.description }}
|
{{ if .Params.description }}
|
||||||
<meta name="description" content="{{ .Params.description }}" />
|
<meta name="description" content="{{ .Params.description }}" />
|
||||||
|
<meta property="og:description" content="{{ .Params.description }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<meta name="description" content="{{ .Params.title }}" />
|
<meta name="description" content="{{ .Params.title }}" />
|
||||||
|
<meta property="og:description" content="{{ .Params.title }}" />
|
||||||
|
{{ end }}
|
||||||
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
|
<meta property="og:title" content="{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }}" />
|
||||||
|
{{ if eq .Section "blog" }}
|
||||||
|
{{ with findRE "<img.*?>" .Content 1 }}
|
||||||
|
<meta property="og:image" content="{{ index . 0 | replaceRE ".*src=\"(.+?)\".*" "$1" }}" />
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<script
|
<script
|
||||||
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user