From 58f951af9982f6b06afcdb91c0541b340c25e218 Mon Sep 17 00:00:00 2001 From: peter_rabbit <pierrejarriges@gmail.com> Date: Wed, 3 Feb 2021 17:40:53 +0100 Subject: [PATCH] fix:hide 'seo h1' --- build.js | 4 ++-- public/education/index.html | 2 +- public/games/index.html | 2 +- public/index.html | 2 +- public/software-development/index.html | 2 +- public/style/style.css | 3 +++ src/style.scss | 3 +++ 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/build.js b/build.js index e0b7cbd..7e7c53a 100644 --- a/build.js +++ b/build.js @@ -29,8 +29,8 @@ function getPageHtml(pageName, pageMeta) { `<title>${pageMeta.title}</title>` ); html = html.replace( - html.match(new RegExp(`<h1>.+</h1>`, "g")), - `<h1>${pageMeta.title}</h1>` + html.match(new RegExp(`<h1 id="seo-title">.+</h1>`, "g")), + `<h1 id="seo-title">${pageMeta.title}</h1>` ); }; const setStyleSheet = function () { diff --git a/public/education/index.html b/public/education/index.html index 4cde339..90c7877 100644 --- a/public/education/index.html +++ b/public/education/index.html @@ -26,7 +26,7 @@ </head> <body> <!-- The H1 tag will be never seen but it's necessary for SEO --> - <main><h1>Kuadrado Software | Pédagogie</h1></main> + <main><h1 id="seo-title">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 5f459c8..179fca2 100644 --- a/public/games/index.html +++ b/public/games/index.html @@ -28,7 +28,7 @@ </head> <body> <!-- The H1 tag will be never seen but it's necessary for SEO --> - <main><h1>Kuadrado Software | Jeux</h1></main> + <main><h1 id="seo-title">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 f30fe4b..0d6db3a 100644 --- a/public/index.html +++ b/public/index.html @@ -38,7 +38,7 @@ </head> <body> <!-- The H1 tag will be never seen but it's necessary for SEO --> - <main><h1>Kuadrado Software</h1></main> + <main><h1 id="seo-title">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 0f999db..584a581 100644 --- a/public/software-development/index.html +++ b/public/software-development/index.html @@ -26,7 +26,7 @@ </head> <body> <!-- The H1 tag will be never seen but it's necessary for SEO --> - <main><h1>Kuadrado Software | Software</h1></main> + <main><h1 id="seo-title">Kuadrado Software | Software</h1></main> </body> <script type="text/javascript" src="./software-development.js"></script> </html> diff --git a/public/style/style.css b/public/style/style.css index 0b78097..aff3fcc 100644 --- a/public/style/style.css +++ b/public/style/style.css @@ -30,6 +30,9 @@ body .bg-blue { background-color: #4baabb; color: white; } +body #seo-title { + visibility: hidden; +} main { display: flex; diff --git a/src/style.scss b/src/style.scss index f11b96e..4c97d06 100644 --- a/src/style.scss +++ b/src/style.scss @@ -34,6 +34,9 @@ body { background-color: $blue_2; color: white; } + #seo-title { + visibility: hidden; + } } main { -- GitLab