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 9566672d authored by Pierre Jarriges's avatar Pierre Jarriges
Browse files

fix build subpages

parent 67503be8
No related branches found
No related tags found
No related merge requests found
......@@ -163,6 +163,18 @@ function getPageHtml(pageName, pageMeta) {
return html;
}
function deletePageDirectory(path) {
try {
const nestedFiles = fs.readdirSync(path);
for (const nf of nestedFiles) {
fs.unlinkSync(`${path}/${nf}`);
}
fs.rmdirSync(path);
} catch (error) {
console.error(error);
}
}
function createPages(rootdir, destdir) {
const pages = fs.readdirSync(rootdir);
......@@ -186,6 +198,12 @@ function createPages(rootdir, destdir) {
if (fs.existsSync(`${fPath}/subpages`)) {
createPages(`${fPath}/subpages`, targetDirPath);
} else {
for (const d of fs.readdirSync(targetDirPath).filter(f => {
return fs.statSync(`${targetDirPath}/${f}`).isDirectory()
})) {
deletePageDirectory(`${targetDirPath}/${d}`)
}
}
}
......@@ -196,16 +214,7 @@ function createPages(rootdir, destdir) {
return stats.isDirectory();
})) {
if (!pages.includes(dir)) {
const dPath = `${destdir}/${dir}`;
try {
const nestedFiles = fs.readdirSync(dPath);
for (const nf of nestedFiles) {
fs.unlinkSync(`${dPath}/${nf}`);
}
fs.rmdirSync(dPath);
} catch (error) {
console.error(error);
}
deletePageDirectory(`${destdir}/${dir}`)
}
}
}
......
This diff is collapsed.
<!DOCTYPE html>
<html lang="fr" prefix="og: https://ogp.me/ns#">
<head>
<meta charset="utf-8" />
<title>Kuadrado Software | Game Studio Club</title>
<meta name="description" content="Apprendre à créer un jeu vidéo de A à Z"/>
<meta name="author" content="Kuadrado Software" />
<meta name="image" content="https://kuadrado-software.fr/assets/images/brain.png"/>
<!-- Open Graph Protocol meta data -->
<meta property="og:title" content="Kuadrado Software | Game Studio Club"/>
<meta property="og:description" content="Apprendre à créer un jeu vidéo de A à Z"/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://kuadrado-software.fr/gamedev"/>
<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" />
<!-- English translation not ready yet -->
<!-- <meta property="og:locale:alternate" content="en_GB" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link href="/style/style.css" rel="stylesheet" />
<script type="application/ld+json">{"@context":"https://schema.org","type":"WebPage","description":"Apprendre à créer un jeu vidéo de A à Z","image":["https://kuadrado-software.fr/assets/images/brain.svg","https://kuadrado-software.fr/assets/images/brain.png","https://kuadrado-software.fr/assets/images/game_studio_banner.png","https://kuadrado-software.fr/assets/images/popularization_banner.png"],"keywords":"Apprendre informatique jeu vidéo, gamedev, code","name":"Kuadrado Software - Game Studio Club","url":"https://kuadrado-software.fr/education/game-studio/club"}</script>
</head>
<!-- The vocab attribute defines the standard vocabulary used for RDFa standard.
The DOM may contain properties such as "typeof" and "property" accordinly to the schema.org vocabulary -->
<body vocab="https://schema.org/">
<!-- The H1 tag will be never seen but it's necessary for SEO -->
<main><h1 style="visibility: hidden">Kuadrado Software | Game Studio Club</h1></main>
</body>
<script type="text/javascript" src="./gamedev.js"></script>
</html>
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