feat: Update twitter card
This commit is contained in:
parent
2f1f498090
commit
8576d3cb9d
|
@ -28,7 +28,7 @@
|
||||||
<meta name="twitter:title" content="{{ default .Site.Title .Title }}" />
|
<meta name="twitter:title" content="{{ default .Site.Title .Title }}" />
|
||||||
<meta name="twitter:description" content="{{ $.Site.Params.description }}" />
|
<meta name="twitter:description" content="{{ $.Site.Params.description }}" />
|
||||||
<meta name="twitter:url" content="{{ .Site.BaseURL }}" />
|
<meta name="twitter:url" content="{{ .Site.BaseURL }}" />
|
||||||
<meta name="twitter:image:src" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
|
<meta name="twitter:image" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||||
<meta name="description" content="{{ .Description }}" />
|
<meta name="description" content="{{ .Description }}" />
|
||||||
|
@ -45,9 +45,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="twitter:url" content="{{ .Permalink }}" />
|
<meta name="twitter:url" content="{{ .Permalink }}" />
|
||||||
{{ if .Params.SocialImage }}
|
{{ if .Params.SocialImage }}
|
||||||
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" />
|
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<meta name="twitter:image:src" content="{{ .Site.Params.SocialImage }}" />
|
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Site.Params.SocialImage }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
"@context": "http://schema.org/",
|
"@context": "http://schema.org/",
|
||||||
"@type": "WebSite",
|
"@type": "WebSite",
|
||||||
"name": "{{ default .site.Title .Title }}",
|
"name": "{{ default .site.Title .Title }}",
|
||||||
"image": "{{ .Site.Params.SocialImage }}",
|
"image": "{{ .Site.BaseURL}}{{ default .Site.Params.SocialImage .Params.SocialImage }}",
|
||||||
"about": "{{ $.Site.Params.description }}"
|
"about": "{{ .Site.Params.description }}"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue