From 7c5b21dadd163a302c239cdb1d1bae4bd19dc9b4 Mon Sep 17 00:00:00 2001
From: peter_rabbit <pierrejarriges@gmail.com>
Date: Tue, 2 Feb 2021 21:12:48 +0100
Subject: [PATCH] fix:missing h1 before rendering

---
 build.js                               | 4 ++++
 public/education/index.html            | 5 +++--
 public/games/index.html                | 5 +++--
 public/index.html                      | 7 ++++---
 public/software-development/index.html | 5 +++--
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/build.js b/build.js
index 612a6a4..e0b7cbd 100644
--- a/build.js
+++ b/build.js
@@ -28,6 +28,10 @@ function getPageHtml(pageName, pageMeta) {
             html.match(new RegExp(`<title.+</title>`, "g"))[0],
             `<title>${pageMeta.title}</title>`
         );
+        html = html.replace(
+            html.match(new RegExp(`<h1>.+</h1>`, "g")),
+            `<h1>${pageMeta.title}</h1>`
+        );
     };
     const setStyleSheet = function () {
         html = html.replace(
diff --git a/public/education/index.html b/public/education/index.html
index 28cbef6..4cde339 100644
--- a/public/education/index.html
+++ b/public/education/index.html
@@ -15,7 +15,7 @@
         <meta property="og:image" content="https://kuadrado-software.fr/assets/images/brain.png"/>
         <meta property="twitter: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"/>
+        <meta property="og:site_name" content="Kuadrado Software" />
 
         <!-- English translation not ready yet -->
         <!-- <meta property="og:locale:alternate" content="en_GB" /> -->
@@ -25,7 +25,8 @@
         <link href="/style/style.css" rel="stylesheet" />
     </head>
     <body>
-        <main></main>
+        <!-- The H1 tag will be never seen but it's necessary for SEO -->
+        <main><h1>Kuadrado Software | Pédagogie</h1></main>
     </body>
     <script type="text/javascript" src="./education.js"></script>
 </html>
diff --git a/public/games/index.html b/public/games/index.html
index 993989c..5f459c8 100644
--- a/public/games/index.html
+++ b/public/games/index.html
@@ -17,7 +17,7 @@
 <meta property="og:image" content="https://kuadrado-software.fr/assets/images/popularization_banner.png"/>
         <meta property="twitter:image" content="https://kuadrado-software.fr/assets/images/game_controller.png"/>
         <meta property="og:locale" content="fr_FR"/>
-        <meta property="og:site_name" content="Kuadrado Software"/>
+        <meta property="og:site_name" content="Kuadrado Software" />
 
         <!-- English translation not ready yet -->
         <!-- <meta property="og:locale:alternate" content="en_GB" /> -->
@@ -27,7 +27,8 @@
         <link href="/style/style.css" rel="stylesheet" />
     </head>
     <body>
-        <main></main>
+        <!-- The H1 tag will be never seen but it's necessary for SEO -->
+        <main><h1>Kuadrado Software | Jeux</h1></main>
     </body>
     <script type="text/javascript" src="./games.js"></script>
 </html>
diff --git a/public/index.html b/public/index.html
index 3da3267..f30fe4b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -8,7 +8,7 @@
             content="Créations numériques, jeux vidéos, web, software et pédagogie. Made in Ardèche, Vernoux en Vivarais."
         />
         <meta name="author" content="Kuadrado Software" />
-        <meta name="image" content="https://kuadrado-software.fr/assets/images/logo_kuadrado.png"/>
+        <meta name="image" content="https://kuadrado-software.fr/assets/images/logo_kuadrado.png" />
 
         <!-- Open Graph Protocol meta data -->
         <meta property="og:title" content="Kuadrado Software" />
@@ -27,7 +27,7 @@
             content="https://kuadrado-software.fr/assets/images/logo_kuadrado.png"
         />
         <meta property="og:locale" content="fr_FR" />
-        <meta property="og:site_name" content="Kuadrado Software"/>
+        <meta property="og:site_name" content="Kuadrado Software" />
 
         <!-- English translation not ready yet -->
         <!-- <meta property="og:locale:alternate" content="en_GB" /> -->
@@ -37,7 +37,8 @@
         <link href="/style/style.css" rel="stylesheet" />
     </head>
     <body>
-        <main></main>
+        <!-- The H1 tag will be never seen but it's necessary for SEO -->
+        <main><h1>Kuadrado Software</h1></main>
     </body>
     <script type="text/javascript" src="main.js"></script>
 </html>
diff --git a/public/software-development/index.html b/public/software-development/index.html
index fa11c37..0f999db 100644
--- a/public/software-development/index.html
+++ b/public/software-development/index.html
@@ -15,7 +15,7 @@
         <meta property="og:image" content="https://kuadrado-software.fr/assets/images/meca_proc.png"/>
         <meta property="twitter: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"/>
+        <meta property="og:site_name" content="Kuadrado Software" />
 
         <!-- English translation not ready yet -->
         <!-- <meta property="og:locale:alternate" content="en_GB" /> -->
@@ -25,7 +25,8 @@
         <link href="/style/style.css" rel="stylesheet" />
     </head>
     <body>
-        <main></main>
+        <!-- The H1 tag will be never seen but it's necessary for SEO -->
+        <main><h1>Kuadrado Software | Software</h1></main>
     </body>
     <script type="text/javascript" src="./software-development.js"></script>
 </html>
-- 
GitLab