From 99f49b4b2d662f0dd91d9c49298af4690b8427bc Mon Sep 17 00:00:00 2001 From: trean Date: Thu, 15 Jun 2023 19:41:40 +0200 Subject: [PATCH] added canonical metatag to documentation pages (#191) --- qdrant-landing/README.md | 15 +++++++++++++++ .../qdrant/layouts/partials/seo_schema.html | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/qdrant-landing/README.md b/qdrant-landing/README.md index fcd6dfab1..c36900f61 100644 --- a/qdrant-landing/README.md +++ b/qdrant-landing/README.md @@ -84,6 +84,21 @@ Preview images set consists of the following images: `title.webp` - 898x300px (used on the article's page as the main image before the article title **for browsers, supporting webp**) `social_preview.jpg` - 1200x630px (used in social media previews) +# Documentation + +## Metadata + +Documentation pages are written in markdown and stored in `content/documentation` directory. Each page has a header with metadata: + +```yaml +--- +title: Here goes the title of the page #required +weight: 10 # This is the order of the page in the sidebar. The lower the number, the higher the page will be in the sidebar. +canonicalUrl: https://qdrant.io/documentation/ # Optional. This is the canonical url of the page. +hideInSidebar: true # Optional. If true, the page will not be shown in the sidebar. It can be used in regular documentation pages and in documentation section pages (_index.md). +--- +``` + ## Documentation sidebar ### Delimiter diff --git a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html index 3ead660ca..5e7e5aedb 100644 --- a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html +++ b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html @@ -155,4 +155,13 @@ {{ if .Params.author }} +{{ end }} + + +{{ if (eq .Section "documentation") }} +{{ if .Params.canonicalUrl }} + +{{ else }} + +{{ end }} {{ end }} \ No newline at end of file