From 34cfe9e2de896dbf0e6b8d38be5c1fc65038bd0e Mon Sep 17 00:00:00 2001 From: Christian Engel Date: Thu, 25 Aug 2022 10:34:58 +0200 Subject: [PATCH] Add structure data JSON-LD --- layouts/partials/head.html | 1 + layouts/partials/site_schema.html | 66 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 layouts/partials/site_schema.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9bf6277..e9f0211 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -35,6 +35,7 @@ {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} {{ template "partials/favicons.html" . }} + {{ template "partials/site_schema.html" . }} +{ + "@context": "http://schema.org", + "@type": "WebSite", + "name": "{{ .Site.Title }}", + "url": "{{ .Site.BaseURL }}", + "description": "{{ .Site.Params.description }}", + {{ with .Site.Params.favicons.icon32 }}"thumbnailUrl": "{{ . | absURL }}",{{ end }} + "license": "{{ .Site.Copyright }}" +} + +{{ else if .IsPage }} + {{ $author := or (.Params.author) (.Site.Author.name) }} + {{ $org_name := .Site.Title }} +{{ end }}