From 1932053d5aefcec5edda674ad1ffcb66aab91278 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 28 Sep 2021 20:44:59 +0200 Subject: [PATCH] feat: add microformats (#214) --- .../features/{_index.html => _index.md} | 0 exampleSite/content/features/code-blocks.md | 4 ++ exampleSite/content/usage/menus.md | 4 ++ layouts/_default/baseof.html | 3 + layouts/partials/head/microformats.html | 2 + layouts/partials/head/rel-me.html | 1 + layouts/partials/head/schema.html | 65 +++++++++++++++++++ 7 files changed, 79 insertions(+) rename exampleSite/content/features/{_index.html => _index.md} (100%) create mode 100644 layouts/partials/head/microformats.html create mode 100644 layouts/partials/head/rel-me.html create mode 100644 layouts/partials/head/schema.html diff --git a/exampleSite/content/features/_index.html b/exampleSite/content/features/_index.md similarity index 100% rename from exampleSite/content/features/_index.html rename to exampleSite/content/features/_index.md diff --git a/exampleSite/content/features/code-blocks.md b/exampleSite/content/features/code-blocks.md index 856b420..abd0ccc 100644 --- a/exampleSite/content/features/code-blocks.md +++ b/exampleSite/content/features/code-blocks.md @@ -1,3 +1,7 @@ +--- +title: Code Blocks +--- + There are multiple ways to add code blocks. Most of them works out of the box only the Hugo shortcode `` need some configuration to work properly. {{< toc >}} diff --git a/exampleSite/content/usage/menus.md b/exampleSite/content/usage/menus.md index 97b4e8f..5761ce6 100644 --- a/exampleSite/content/usage/menus.md +++ b/exampleSite/content/usage/menus.md @@ -1,3 +1,7 @@ +--- +title: Menus +--- + The theme supports two different kinds of menus. File-tree menu is the default one and does not require further configuration to work. If you want full control about your menu the bundle menu is a powerful option to accomplish it. {{< toc >}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index aea0a1a..b540cb8 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,7 +6,10 @@ {{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }} {{ partial "head/favicons" . }} + {{ partial "head/rel-me" . }} + {{ partial "head/microformats" . }} {{ partial "head/others" . }} + {{ partial "head/schema" . }} {{ partial "head/custom" . }} diff --git a/layouts/partials/head/microformats.html b/layouts/partials/head/microformats.html new file mode 100644 index 0000000..47183f7 --- /dev/null +++ b/layouts/partials/head/microformats.html @@ -0,0 +1,2 @@ +{{ template "_internal/opengraph.html" . }} +{{ template "_internal/twitter_cards.html" . }} diff --git a/layouts/partials/head/rel-me.html b/layouts/partials/head/rel-me.html new file mode 100644 index 0000000..59a3461 --- /dev/null +++ b/layouts/partials/head/rel-me.html @@ -0,0 +1 @@ + diff --git a/layouts/partials/head/schema.html b/layouts/partials/head/schema.html new file mode 100644 index 0000000..d04d7fd --- /dev/null +++ b/layouts/partials/head/schema.html @@ -0,0 +1,65 @@ +{{ if .IsHome -}} +{{ $thumbnail := default (default "brand.svg" .Site.Params.logo) (index (default slice .Site.Params.images) 0) | absURL }} + +{{ else if .IsPage }} +{{ $description := default .Site.Params.description (default .Description .Summary) }} + +{{ end }}