You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/01/26 12:22:48 UTC

[GitHub] [camel-website] zregvart commented on a change in pull request #767: fix: social link dynamically retrieved

zregvart commented on a change in pull request #767:
URL: https://github.com/apache/camel-website/pull/767#discussion_r792577077



##########
File path: 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 }}">

Review comment:
       Where does the `.Description` come from? I can see only that some security announcements have a `description` front matter set.

##########
File path: 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 }}

Review comment:
       I think we're missing an `{{ else }}` here, if there is no `page.Description` and no `page.Params.preview` defined.

##########
File path: 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 }}">

Review comment:
       Perhaps we should also have in mind the [best practices](https://developers.facebook.com/docs/sharing/best-practices#images) for Open Graph images, and think if we should resize the image or place the width/height properties as well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org