From a135e9bc110cb3337101e7e9d6d29c391430b0fc Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 1 May 2022 11:55:39 +0200 Subject: Add Facebook Page Admin ID support for Domain Insights --- exampleSite/config.toml | 5 +++++ 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 @@ {{- if .Params.cover.image -}} {{- if (ne .Params.cover.relative true) }} - + {{- else }} - + {{- end }} {{- if .Params.cover.width -}} @@ -23,6 +23,10 @@ {{- end }} -{{- /* TODO: add fb:admins and fb:app_id */ -}} - - +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with site.Social.facebook_admin }} + +{{- end }} +{{- with site.Social.facebook_id }} + +{{- end }} -- cgit v1.2.3