Different seo schema for differen pages (#93)

* different seo schema for differen pages

* removed unused condition
This commit is contained in:
trean
2022-11-23 17:19:19 +01:00
committed by GitHub
parent 715d0b6473
commit f7d08cd07d
2 changed files with 28 additions and 0 deletions
@@ -14,4 +14,6 @@ keywords:
- vector search
- embedding
preview_image: /benchmarks/benchmark-1.png
seo_schema: { "@context": "https://schema.org", "@type": "Article", "headline": "Vector Search Comparative Benchmarks", "image": [ "https://qdrant.tech/benchmarks/benchmark-1.png" ], "abstract": "The first comparative benchmark and benchmarking framework for vector search engines", "datePublished": "2022-08-23", "dateModified": "2022-08-23", "author": [{ "@type": "Organization", "name": "Qdrant", "url": "https://qdrant.tech" }] }
---
@@ -10,6 +10,7 @@
<meta name="keywords" content="{{ range .Site.Params.Keywords }}{{ . }}, {{ end }} qdrant">
{{ end }}
{{ if .IsHome }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
@@ -66,6 +67,31 @@
}
}
</script>
{{ else if .Params.seo_schema }}
<!-- todo: use as default option -->
<script type="application/ld+json">
{{ .Params.seo_schema }}
</script>
{{ else if and (eq .Section "articles") .IsPage }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{{ .Params.title }}",
"image": [
{{ .Params.social_preview_image | absURL }},
],
"abstract": {{ .Params.description }},
"datePublished": {{ .Params.date }},
"dateModified": {{ .Params.date }},
"author": [{
"@type": "Person",
"name": {{ .Params.author }},
"url": {{ .Params.author_link }}
}]
}
</script>
{{ end }}
{{ $url := urls.Parse .Site.BaseURL }}
{{ $domain := index (split $url.Host ".") 0 }}