CHANGE open graph use default template
This commit is contained in:
parent
e9271c3ef1
commit
c1594f153b
1 changed files with 1 additions and 21 deletions
|
@ -5,28 +5,8 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="color-scheme" content="dark light">
|
<meta name="color-scheme" content="dark light">
|
||||||
|
{{ template "_internal/opengraph.html" . }}
|
||||||
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
|
||||||
{{ block "opengraph" . }}
|
|
||||||
<meta property="og:type" content="website" />
|
|
||||||
{{ with .Site.LanguageCode }}
|
|
||||||
<meta property="og:locale" content='{{ replace . "-" "_" }}' />
|
|
||||||
{{ end }}
|
|
||||||
<meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
|
||||||
<meta property="og:url" content="{{ .Permalink }}" />
|
|
||||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
|
||||||
{{ if .Params.image }}
|
|
||||||
<meta property="og:image" content="{{ .Params.image | absURL }}" />
|
|
||||||
{{ else }}
|
|
||||||
<meta property="og:image" content="{{ .Site.Params.logo | absURL }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Params.summary }}
|
|
||||||
<meta property="og:description" content="{{ .Params.summary }}" />
|
|
||||||
{{ else if .Content }}
|
|
||||||
<meta property="og:description" content="{{ .Content | safeHTML | truncate 100 }}" />
|
|
||||||
{{ else }}
|
|
||||||
<meta property="og:description" content="{{ .Site.Params.Description }}" />
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.favIcon }}
|
{{ with .Site.Params.favIcon }}
|
||||||
{{ if .ico }}
|
{{ if .ico }}
|
||||||
<link rel="icon" type="image/x-icon" href="{{ .ico }}">
|
<link rel="icon" type="image/x-icon" href="{{ .ico }}">
|
||||||
|
|
Loading…
Reference in a new issue