diff options
| -rw-r--r-- | exampleSite/config.toml | 5 | ||||
| -rw-r--r-- | layouts/partials/templates/opengraph.html | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index fe4c94a..9b1e783 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -25,6 +25,11 @@ defaultContentLanguage = "en" # Used in site header tagline = "a Hugo theme for minimal editions" +[social] + # Facebook Page Admin ID for Domain Insights + facebook_admin = "" + facebook_id = "" + [menu] [[menu.nav]] name = "About" diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 71e040e..55bcbe3 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -5,9 +5,9 @@ <meta property="og:url" content="{{ .Permalink }}"> {{- if .Params.cover.image -}} {{- if (ne .Params.cover.relative true) }} - <meta property="og:image" content="{{ .Params.cover.image | absURL }}" /> + <meta property="og:image" content="{{ .Params.cover.image | absURL }}"> {{- else }} - <meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" /> + <meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}"> {{- end }} {{- if .Params.cover.width -}} @@ -23,6 +23,10 @@ <meta property="og:image:height" content="200"> {{- end }} -{{- /* TODO: add fb:admins and fb:app_id */ -}} -<!-- meta property="fb:admins" content="" --> -<!-- meta property="fb:app_id" content="" --> +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with site.Social.facebook_admin }} + <meta property="fb:admins" content="{{ . }}"> +{{- end }} +{{- with site.Social.facebook_id }} + <meta property="fb:app_id" content="{{ . }}"> +{{- end }} |
