* 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>
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:site_name" content="Shockrah's not-a-blog">
|
||||
{{ $url := print .RelPermalink }}
|
||||
<meta property="og:url" content="https://shockrah.xyz">
|
||||
{{ $url := .RelPermalink | absURL }}
|
||||
<meta property="og:url" content="{{$url}}">
|
||||
{{ $desc := print .Description }}
|
||||
{{ if .IsHome }}{{ $desc = .Params.Description }}{{end}}
|
||||
<meta property="og:description" content="{{ $desc }}">
|
||||
<meta property="og:type" content="website">
|
||||
{{ $ogimage := "/favicon.png" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ $ogimage = .Params.Image }}
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ $ogimage }}">
|
||||
{{ $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" }}
|
||||
{{ if .Params.Image }}
|
||||
{{ $ogimage = .Params.Image }}
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ $ogimage }}">
|
||||
{{ end }}
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user