add optional ogp and twitter meta tags
This commit is contained in:
@@ -9,3 +9,5 @@ theme = "aether"
|
||||
brand = "aether"
|
||||
description = "aether Hugo theme for blogs"
|
||||
bgimg = "img/ignasi_pattern_s.png"
|
||||
metaCreator = "Joe Hutchinson"
|
||||
metaImage = "img/ogimage.jpg"
|
||||
|
||||
7
exampleSite/layouts/partials/ogp.html
Normal file
7
exampleSite/layouts/partials/ogp.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<meta property="og:locale" content="{{ .Site.Language.Lang }}">
|
||||
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}">
|
||||
<meta property="og:title" content="{{ .Site.Params.Brand }}">
|
||||
<meta property="og:description" content="{{ .Site.Params.description }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Params.Brand }}">
|
||||
<meta property="og:image" content="{{ .Site.Params.metaImage | absURL }}">
|
||||
6
exampleSite/layouts/partials/twitter.html
Normal file
6
exampleSite/layouts/partials/twitter.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="{{ .Site.Params.Brand }}">
|
||||
<meta name="twitter:description" content="{{ .Site.Params.description }}">
|
||||
<meta name="twitter:site" content="{{ .Site.BaseURL }}">
|
||||
<meta name="twitter:creator" content="{{ .Site.Params.metaCreator }}">
|
||||
<meta name="twitter:image" content="{{ .Site.Params.metaImage | absURL }}">
|
||||
Reference in New Issue
Block a user