diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 6c803df..2554bb2 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -2,7 +2,7 @@ name: PullRequestAction
on:
pull_request_target:
- branches: [ main ]
+ branches: [main]
# Cancel in-progress jobs or runs for the current pull request
concurrency:
diff --git a/.github/workflows/push_main.yml b/.github/workflows/push_main.yml
index 89613ef..88fde0b 100644
--- a/.github/workflows/push_main.yml
+++ b/.github/workflows/push_main.yml
@@ -59,6 +59,7 @@ jobs:
export CLOUDINARY_API_KEY=${{ secrets.CLOUDINARY_API_KEY }}
export CLOUDINARY_API_SECRET=${{ secrets.CLOUDINARY_API_SECRET }}
export CLOUDINARY_URL=${{ secrets.CLOUDINARY_URL }}
+ export PUBLIC_CLOUDINARY_CLOUD_NAME=${{ secrets.PUBLIC_CLOUDINARY_CLOUD_NAME }}
export CUSTOM_DOMAIN=${{ vars.MAIN_CUSTOM_DOMAIN }}
export GA_ID=${{ vars.MAIN_GA_ID }}
# Set up yarn
diff --git a/package.json b/package.json
index 81d6f99..7317842 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
"@solid-primitives/scheduled": "^1.4.3",
"@tailwindcss/typography": "^0.5.12",
"astro": "^4.5.16",
+ "astro-cloudinary": "^1.1.0",
"astro-icon": "^1.1.0",
"astro-navbar": "^2.3.1",
"astro-pagefind": "^1.4.0",
diff --git a/src/components/head/BaseHead.astro b/src/components/head/BaseHead.astro
index e127d0e..fda1853 100644
--- a/src/components/head/BaseHead.astro
+++ b/src/components/head/BaseHead.astro
@@ -4,12 +4,97 @@ import GoogleAnalytics from "./GoogleAnalytics.astro";
import { SEO } from "astro-seo";
import "@fontsource/lato";
import "../../styles/global.scss";
+import { getCldOgImageUrl } from 'astro-cloudinary/helpers';
const GA_ID = import.meta.env.GA_ID;
-const { title = "", description = "", type = "website" } = Astro.props;
+const { title = "", description = "", type = "website", image = "" } = Astro.props;
+
+const logoPublicId = 'linaro-website/graphics/infinito-cropped.svg';
+
+const social_image = getCldOgImageUrl({
+ src: image,
+ effects: [
+ {
+ background: 'rgb:010A44'
+ },
+ {
+ color: 'rgb:6715E8',
+ colorize: '100'
+ },
+ {
+ gradientFade: 'symmetric'
+ }
+ ],
+ overlays: [
+ {
+ publicId: image,
+ width: 1200,
+ height: 630,
+ crop: 'fill',
+ effects: [
+ { opacity: 20 }
+ ]
+ },
+ {
+ width: 1000,
+ crop: 'fit',
+ text: {
+ color: 'white',
+ fontFamily: 'Lato',
+ fontSize: 36,
+ fontWeight: 'normal',
+ lineSpacing: 10,
+ lineSpacing: 10,
+ text: title
+ },
+ position: {
+ x: 100,
+ y: 100,
+ gravity: 'north_west'
+ },
+ },
+ {
+ publicId: image,
+ width: 1000,
+ height: 2,
+ effects: [{
+ colorize: '100,co_white',
+ opacity: 70
+ }],
+ position: {
+ x: 100,
+ y: 175,
+ gravity: 'south_west'
+ },
+ },
+ {
+ width: 60,
+ crop: 'fit',
+ publicId: logoPublicId,
+ position: {
+ x: 100,
+ y: 102,
+ gravity: 'south_west'
+ },
+ },
+ {
+ text: {
+ color: 'white',
+ fontFamily: 'Lato',
+ fontSize: 37,
+ fontWeight: 'bold',
+ text: "Linaro.org"
+ },
+ position: {
+ x: 180,
+ y: 100,
+ gravity: 'south_west'
+ },
+ },
+ ]
+})
-const social_image = "";
---
@@ -78,7 +163,7 @@ const social_image = "";
],
meta: [
{
- property: "twitter:image",
+ name: "twitter:image",
content: social_image,
},
{
@@ -93,4 +178,4 @@ const social_image = "";
}}
/>
-
+
\ No newline at end of file
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index 101d169..2c17279 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -6,14 +6,20 @@ import Footer from "@/components/footer/Footer.astro";
interface Props {
title: string;
description: string;
+ image?: string;
type?: string;
}
-const { title, description, type = "website" } = Astro.props;
+const { title, description, type = "website", image } = Astro.props;
---
-
+
diff --git a/src/layouts/BlogLayout.astro b/src/layouts/BlogLayout.astro
index af45779..3481342 100644
--- a/src/layouts/BlogLayout.astro
+++ b/src/layouts/BlogLayout.astro
@@ -37,7 +37,7 @@ const {
} = Astro.props;
const { data: author } = (await getEntry(
- authorRef
+ authorRef,
)) as CollectionEntry<"authors">;
const tags = await getEntries(tagList);
@@ -62,7 +62,7 @@ const summary =
.use(stripMarkdown, {
remove: ["heading"],
})
- .process(body)
+ .process(body),
)
.split(" ")
.slice(0, 30)
@@ -88,15 +88,17 @@ if (related.length > 0) {
}
---
-
+
+ class="z-0"
+ >
+ ]}
+ >
{title}
@@ -153,7 +155,8 @@ if (related.length > 0) {