diff --git a/build.js b/build.js index 6f230d75c7443ecc197d8bdefdde2e16101e7ed2..4638f9be8f1ded0f62bb499ddcb05868cc655f89 100644 --- a/build.js +++ b/build.js @@ -99,10 +99,20 @@ function getPageHtml(pageName, pageMeta) { const { key, defaultValue } = entry; html = html.replace( html.match(getOgMetaSearchRegex(key)), - `<meta property="og:${key}" content="${pageOgMeta[key] || defaultValue}"/>` + (function () { + const customValue = pageOgMeta[key]; + if (!customValue) + return `<meta property="og:${key}" content="${defaultValue}"/>`; + else { + return Array.isArray(customValue) + ? customValue + .map(alt => `<meta property="og:${key}" content="${alt}"/>`) + .join("\n") + : `<meta property="og:${key}" content="${customValue}"/>`; + } + })() ); }); - const additionalOgMeta = Object.keys(pageMeta.open_graph).filter( k => !requiredOgMeta.map(rom => rom.key).includes(k) ); diff --git a/public/education/index.html b/public/education/index.html index 9683037371d9869f753b28478ed950dcd5e79d62..e7fcc43de2708fbbeae8dc122aa40823e9f7cbba 100644 --- a/public/education/index.html +++ b/public/education/index.html @@ -5,15 +5,16 @@ <title>Kuadrado Software | Pédagogie</title> <meta name="description" content="Animations autour de la création de jeux vidéos, vulgarisation numérique. Découvrez nos initiatives pédagogiques."/> <meta name="author" content="Kuadrado Software" /> - <meta name="image" content="https://kuadrado-software.fr/assets/images/brain.svg"/> + <meta name="image" content="https://kuadrado-software.fr/assets/images/brain.png"/> <!-- Open Graph Protocol meta data --> <meta property="og:title" content="Kuadrado Software | Pédagogie"/> <meta property="og:description" content="Animations autour de la création de jeux vidéos, vulgarisation numérique. Découvrez nos initiatives pédagogiques."/> <meta property="og:type" content="website" /> <meta property="og:url" content="https://kuadrado-software.fr/education"/> - <meta property="og:image" content="https://kuadrado-software.fr/assets/images/brain.svg"/> + <meta property="og:image" content="https://kuadrado-software.fr/assets/images/brain.png"/> <meta property="og:locale" content="fr_FR"/> + <meta property="og:site_name" content="Kuadrado Software"/> <!-- English translation not ready yet --> <!-- <meta property="og:locale:alternate" content="en_GB" /> --> diff --git a/public/games/index.html b/public/games/index.html index f31754eae918f41f3c62b7de6ad8aff5e8be1564..aa3a2edc9b46358929f54e64695f6a64333ab3a6 100644 --- a/public/games/index.html +++ b/public/games/index.html @@ -5,15 +5,18 @@ <title>Kuadrado Software | Jeux</title> <meta name="description" content="Création de jeux vidéos indépendants. Jeux web, PC et projets en cours de développement"/> <meta name="author" content="Kuadrado Software" /> - <meta name="image" content="https://kuadrado-software.fr/assets/images/game_controller.svg"/> + <meta name="image" content="https://kuadrado-software.fr/assets/images/game_controller.png"/> <!-- Open Graph Protocol meta data --> <meta property="og:title" content="Kuadrado Software | Jeux"/> <meta property="og:description" content="Création de jeux vidéos indépendants. Jeux web, PC et projets en cours de développement"/> <meta property="og:type" content="website" /> <meta property="og:url" content="https://kuadrado-software.fr/games"/> - <meta property="og:image" content="https://kuadrado-software.fr/assets/images/game_controller.svg"/> + <meta property="og:image" content="https://kuadrado-software.fr/assets/images/game_controller.png"/> +<meta property="og:image" content="https://kuadrado-software.fr/assets/images/game_studio_banner.png"/> +<meta property="og:image" content="https://kuadrado-software.fr/assets/images/popularization_banner.png"/> <meta property="og:locale" content="fr_FR"/> + <meta property="og:site_name" content="Kuadrado Software"/> <!-- English translation not ready yet --> <!-- <meta property="og:locale:alternate" content="en_GB" /> --> diff --git a/public/software-development/index.html b/public/software-development/index.html index 26bea0e0bebbad25ccc0bddb93e42b851aa2ad93..9e5d2f7d392ec5f027b0a0f214874b6d031ee0c0 100644 --- a/public/software-development/index.html +++ b/public/software-development/index.html @@ -5,15 +5,16 @@ <title>Kuadrado Software | Software</title> <meta name="description" content="Développement web, moteur de jeux, outillage logiciel, retrouvez nos projets en détail."/> <meta name="author" content="Kuadrado Software" /> - <meta name="image" content="https://kuadrado-software.fr/assets/images/meca_proc.svg"/> + <meta name="image" content="https://kuadrado-software.fr/assets/images/meca_proc.png"/> <!-- Open Graph Protocol meta data --> <meta property="og:title" content="Kuadrado Software | Software"/> <meta property="og:description" content="Développement web, moteur de jeux, outillage logiciel, retrouvez nos projets en détail."/> <meta property="og:type" content="website" /> <meta property="og:url" content="https://kuadrado-software.fr/software-development"/> - <meta property="og:image" content="https://kuadrado-software.fr/assets/images/meca_proc.svg"/> + <meta property="og:image" content="https://kuadrado-software.fr/assets/images/meca_proc.png"/> <meta property="og:locale" content="fr_FR"/> + <meta property="og:site_name" content="Kuadrado Software"/> <!-- English translation not ready yet --> <!-- <meta property="og:locale:alternate" content="en_GB" /> --> diff --git a/src/pages/games/meta.json b/src/pages/games/meta.json index 25ba56c994ca634a99d96917eeb1eb7ab844d1e5..794d9d7681a3b6aa86a42e2daae854aafb370c36 100644 --- a/src/pages/games/meta.json +++ b/src/pages/games/meta.json @@ -4,6 +4,11 @@ "image": "https://kuadrado-software.fr/assets/images/game_controller.png", "open_graph": { "title": "Kuadrado Software | Jeux", - "description": "Création de jeux vidéos indépendants. Jeux web, PC et projets en cours de développement" + "description": "Création de jeux vidéos indépendants. Jeux web, PC et projets en cours de développement", + "image": [ + "https://kuadrado-software.fr/assets/images/game_controller.png", + "https://kuadrado-software.fr/assets/images/game_studio_banner.png", + "https://kuadrado-software.fr/assets/images/popularization_banner.png" + ] } }