This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 673308c  fix: social link dynamically retrieved
673308c is described below

commit 673308cd19415dd624aeb188d30bf1119cd25bcb
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Wed Jan 26 12:52:18 2022 +0100

    fix: social link dynamically retrieved
    
    Closes #679
---
 layouts/partials/header.html | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 3ffa2f4..e7890a1 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -17,12 +17,25 @@
     <link rel="icon" type="image/png" href="{{ "favicon-16x16.png" | relURL 
}}" sizes="16x16">
     <link rel="icon" type="image/png" href="{{ "favicon-128.png" | relURL }}" 
sizes="128x128">
     <meta name="application-name" content="Apache Camel">
-    <meta property="og:title" content="Apache Camel helps you integrate over 
300 different systems!">
-    <meta property="og:site_name" content="Apache Camel">
-    <meta property="og:url" content="https://camel.apache.org";>
-    <meta property="og:description" content="Camel is an open source 
integration framework that empowers you to quickly and easily integrate various 
systems consuming or producing data.">
+    
+    <meta property="og:title" content="{{ .Title }}"> 
+    <meta property="og:site_name" content="{{ .Site.Title }}"> 
+    <meta property="og:url" content="{{ .Permalink }}"> 
+    {{ if .Description}}
+        <meta name="og:description" content="{{ .Description }}">
+    {{ else }}
+        {{ if .Params.preview}}
+        <meta name="og:description" content="{{ .Params.preview }}">
+        {{ end }}
+    {{ end }}
     <meta property="og:type" content="website">
-    <meta property="og:image" content="{{ .Site.Params.organizationLogo }}">
+    {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
+    {{ with $featured }}
+        <meta property="og:image" content="{{ $featured.RelPermalink }}">
+    {{ else }}
+        <meta property="og:image" content="{{ .Site.Params.organizationLogo 
}}">
+    {{ end }}
+    
     <link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
     <title>{{ block "title" . }}{{ .Title }} - {{ .Site.Title }}{{ end 
}}</title>
     <link rel="canonical" href="{{ .Permalink }}">

Reply via email to