diff --git a/config.toml b/config.toml index f8bd194..047396c 100644 --- a/config.toml +++ b/config.toml @@ -277,3 +277,27 @@ avatar = true voting = true page_author_hashes = "" # hash (or list of hashes) of the author. lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API). + +# h-card configuration +# Will identify you on the indieweb (see https://microformats.org/wiki/h-card) +[extra.hcard] +# Enable home page h-card. +enable = true +# Add your email to the card if extra.email is set and not encoded. +with_mail = true +# Add your social links ('socials' config) to the card. +with_social_links = true +# Homepage url. Defaults to the value of 'base_url'. +homepage = "https://zlinux.ru" +avatar = "img/avator.webp" +# Display name, default to the value of 'author'. +full_name = "Zloy Linux" +# Small bio, as shown on social media profiles. +biography = "Linux Man" +# +# You can add any property from https://microformats.org/wiki/h-card#Properties +# Make sure to replace all '-' characters by '_' +# Examples: +p_nickname = "zloy_linux" +# p_locality = "Bordeaux" +p_country_name = "Russia" diff --git a/themes/tabi/templates/partials/hcard.html b/themes/tabi/templates/partials/hcard.html new file mode 100644 index 0000000..91c023b --- /dev/null +++ b/themes/tabi/templates/partials/hcard.html @@ -0,0 +1,75 @@ +{%- set hcard = config.extra.hcard -%} + +{% set full_name = config.author %} +{% if hcard.full_name %} + {% set full_name = hcard.full_name %} +{% endif %} + +{%- set homepage = config.base_url -%} +{% if hcard.homepage %} + {%- set homepage = hcard.homepage -%} +{% endif %} + +{% if hcard.enable %} +
+{% endif %} diff --git a/themes/tabi/templates/section.html b/themes/tabi/templates/section.html index 77b6c73..9065219 100644 --- a/themes/tabi/templates/section.html +++ b/themes/tabi/templates/section.html @@ -24,7 +24,10 @@ {%- endif -%}