* Abs URL for url og tag
+ Support for video embed's ! Default case is still a fallback to using the image tag
This commit is contained in:
parent
113c22de73
commit
8767bece60
@ -9,15 +9,23 @@
|
|||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
<meta property="og:title" content="{{ $title }}">
|
<meta property="og:title" content="{{ $title }}">
|
||||||
<meta property="og:site_name" content="Shockrah's not-a-blog">
|
<meta property="og:site_name" content="Shockrah's not-a-blog">
|
||||||
{{ $url := print .RelPermalink }}
|
{{ $url := .RelPermalink | absURL }}
|
||||||
<meta property="og:url" content="https://shockrah.xyz">
|
<meta property="og:url" content="{{$url}}">
|
||||||
{{ $desc := print .Description }}
|
{{ $desc := print .Description }}
|
||||||
{{ if .IsHome }}{{ $desc = .Params.Description }}{{end}}
|
{{ if .IsHome }}{{ $desc = .Params.Description }}{{end}}
|
||||||
<meta property="og:description" content="{{ $desc }}">
|
<meta property="og:description" content="{{ $desc }}">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
|
{{ $ogvideo := "" }}
|
||||||
|
{{ if .Params.Video }}
|
||||||
|
{{ $ogvideo = .Params.Video }}
|
||||||
|
<meta property="og:video" content="{{ $ogvideo }}">
|
||||||
|
<meta property="og:video:width" content="640">
|
||||||
|
<meta property="og:video:height" content="480">
|
||||||
|
{{ else }}
|
||||||
{{ $ogimage := "/favicon.png" }}
|
{{ $ogimage := "/favicon.png" }}
|
||||||
{{ if .Params.Image }}
|
{{ if .Params.Image }}
|
||||||
{{ $ogimage = .Params.Image }}
|
{{ $ogimage = .Params.Image }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta property="og:image" content="{{ $ogimage }}">
|
<meta property="og:image" content="{{ $ogimage }}">
|
||||||
|
{{ end }}
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user