Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 8d768cae authored by peter_rabbit's avatar peter_rabbit
Browse files

feat og image array

parent 30309ef5
No related branches found
No related tags found
No related merge requests found
......@@ -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)
);
......
......@@ -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" /> -->
......
......@@ -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" /> -->
......
......@@ -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" /> -->
......
......@@ -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"
]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment