mirror of
https://github.com/Aroy-Art/Rinkusu.git
synced 2024-12-27 07:44:23 +01:00
Add basic OpenGraph support
This commit is contained in:
parent
7a13351ea2
commit
2e2daa30df
2 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
|||
<meta name="theme-color" content="{{ site.Params.themeColor }}">
|
||||
{{ end }}
|
||||
|
||||
{{ template "partials/opengraph.html" . }}
|
||||
|
||||
{{ "<!-- Plugins -->" | safeHTML }}
|
||||
{{ range site.Params.plugins.css }}
|
||||
<link rel="stylesheet" href="{{ .link | absURL }}">
|
||||
|
|
6
layouts/partials/opengraph.html
Normal file
6
layouts/partials/opengraph.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
<meta property="og:image" content="{{ with .Params.image }}{{ . | absURL }}{{ else }}{{ with .Site.Params.logo }}{{ . | absURL }}{{ end }}{{ end }}" />
|
Loading…
Reference in a new issue