mirror of https://github.com/istio/istio.io.git
Allow proposing an image in your blog (#14720)
* Update Twitter card preview & OG metadata * Add support for specifying image * card update * try agani * nicer template style * add Resources.Get * absolute-ise URLs * fix netlify config so we can test this. * another try * I haven't built a Makefile in... 20 years? * remove Twitter image as it seems it will fall back to OG * remove test data
This commit is contained in:
parent
979f16a248
commit
318937152a
|
@ -32,19 +32,21 @@
|
|||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="{{ template "description" . }}">
|
||||
{{ if .Permalink }}
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:url" content="{{ .Permalink | absURL }}">
|
||||
{{ end }}
|
||||
{{ with .Resources.Get .Params.social_image }}
|
||||
<meta property="og:image" content="{{ .Permalink | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.png">
|
||||
<meta property="og:image:alt" content="The Istio sailboat logo">
|
||||
<meta property="og:image:width" content="4096">
|
||||
<meta property="og:image:height" content="2048">
|
||||
{{ end }}
|
||||
<meta property="og:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.png">
|
||||
<meta property="og:image:alt" content="The Istio sailboat logo">
|
||||
<meta property="og:image:width" content="4096">
|
||||
<meta property="og:image:height" content="2048">
|
||||
<meta property="og:site_name" content="Istio">
|
||||
|
||||
<!-- Twitter card -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@IstioMesh">
|
||||
<meta name="twitter:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.png">
|
||||
<meta name="twitter:image:alt" content="The Istio sailboat logo">
|
||||
{{ if .Page.Params.twitter }}
|
||||
<meta name="twitter:creator" content="@{{ .Page.Params.twitter }}">
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue