mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-12 06:18:31 +02:00
Fixes of meta tags for social media (#29)
This commit is contained in:
@@ -26,7 +26,7 @@ keywords = "search engine, neural network, matching, filter, SaaS, approximate n
|
|||||||
|
|
||||||
logo = "/images/logo_small_with_text.png"
|
logo = "/images/logo_small_with_text.png"
|
||||||
logo_width = "192"
|
logo_width = "192"
|
||||||
share_preview_img = "/images/logo_with_text.svg"
|
preview_image = "/images/social_preview.png"
|
||||||
|
|
||||||
github = "https://github.com/qdrant/qdrant"
|
github = "https://github.com/qdrant/qdrant"
|
||||||
quick_start = "https://github.com/qdrant/qdrant/blob/master/QUICK_START.md"
|
quick_start = "https://github.com/qdrant/qdrant/blob/master/QUICK_START.md"
|
||||||
|
|||||||
@@ -30,36 +30,36 @@
|
|||||||
{{ $url := urls.Parse .Site.BaseURL }}
|
{{ $url := urls.Parse .Site.BaseURL }}
|
||||||
{{ $domain := index (split $url.Host ".") 0 }}
|
{{ $domain := index (split $url.Host ".") 0 }}
|
||||||
|
|
||||||
{{ $imageUrl := path.Join .Site.BaseURL .Site.Params.share_preview_img}}
|
|
||||||
{{ if .Params.preview_image }}
|
|
||||||
{{ $imageUrl := path.Join .Site.BaseURL .Params.preview_image }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $title := printf "%s" "Qdrant" | printf "%s%s" " - " | printf "%s%s" .Title | printf "%s" }}
|
{{ $title := printf "%s" "Qdrant" | printf "%s%s" " - " | printf "%s%s" .Title | printf "%s" }}
|
||||||
{{ if or ( and (.IsPage) (eq $.Section "blog") ) ( and ($.IsNode) (eq $.Section "") ) }}
|
{{ if or ( and (.IsPage) (eq $.Section "blog") ) ( and ($.IsNode) (eq $.Section "") ) }}
|
||||||
{{ $title := .Title }}
|
{{ $title := .Title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $description := "" }}
|
|
||||||
{{ if .Description }}
|
|
||||||
{{ $description := .Description }}
|
|
||||||
{{ else }}
|
|
||||||
{{if .IsPage}}
|
|
||||||
{{ $description := .Summary }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<!-- Facebook Meta Tags -->
|
<!-- Facebook Meta Tags -->
|
||||||
<meta property="og:url" content="{{ .Permalink }}">
|
<meta property="og:url" content="{{ .Permalink }}">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:title" content="{{ $title }}">
|
<meta property="og:title" content="{{ $title }}">
|
||||||
<meta property="og:description" content="{{ $description }}">
|
|
||||||
<meta property="og:image" content="{{ $imageUrl }}">
|
|
||||||
|
|
||||||
<!-- Twitter Meta Tags -->
|
<!-- Twitter Meta Tags -->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta property="twitter:domain" content="{{ $domain }}">
|
<meta property="twitter:domain" content="{{ $domain }}">
|
||||||
<meta property="twitter:url" content="{{ .Permalink }}">
|
<meta property="twitter:url" content="{{ .Permalink }}">
|
||||||
<meta name="twitter:title" content="{{ $title }}">
|
<meta name="twitter:title" content="{{ $title }}">
|
||||||
<meta name="twitter:description" content="{{ $description }}">
|
|
||||||
<meta name="twitter:image" content="{{ $imageUrl }}">
|
{{ if .Description }}
|
||||||
|
<meta property="og:description" content="{{ .Description }}">
|
||||||
|
<meta name="twitter:description" content="{{ .Description }}">
|
||||||
|
{{ else }}
|
||||||
|
<meta property="og:description" content="{{ .Site.Params.description }}">
|
||||||
|
<meta name="twitter:description" content="{{ .Site.Params.description }}">
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Image -->
|
||||||
|
{{ if .Params.preview_image }}
|
||||||
|
<meta name="og:image" content="{{ .Params.preview_image | relURL }}">
|
||||||
|
<meta name="twitter:image" content="{{ .Params.preview_image | relURL }}">
|
||||||
|
<meta content="my-check!!">
|
||||||
|
{{ else }}
|
||||||
|
<meta name="og:image" content="{{ .Site.Params.preview_image | relURL }}">
|
||||||
|
<meta name="twitter:image" content="{{ .Site.Params.preview_image | relURL }}">
|
||||||
|
{{ end }}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 230 KiB |
Reference in New Issue
Block a user