temp/exemple.temp // Exécute le HTML/PHP avec header et footer vers du HTML statique ob_start(); require "pages/" . $nomPage . ".md"; file_put_contents("temp/" . $nomPage . ".temp", ob_get_contents()); ob_end_clean(); // temp/exemple.temp > temp2/exemple.temp2 // Compile le Markdown/PHP vers du HTML/PHP $contenuPage = ParsedownExtra::instance() ->setUrlsLinked(false) ->setMarkupEscaped(false) ->setBreaksEnabled(true) ->text(file_get_contents("temp/" .$nomPage . ".temp")); file_put_contents("temp2/" . $nomPage . ".temp2", $contenuPage); // temp2/exemple.temp2 > exemple.html // Exécute et cache le PHP en HTML $adresse = $nomPage; ob_start(); require "inc/pages.php"; require "inc/debut.php"; if ($page['type'] == "article") { echo "

" . $page['h1'] . "

"; echo "
"; } else if ($page['type'] == "centré") { echo "
"; } require "temp2/" . $nomPage . ".temp2"; if ($page['type'] == "article") { echo "
"; } else if ($page['type'] == "centré") { echo ""; } require "inc/footer.php"; file_put_contents($nomPage . ".html", ob_get_contents()); ob_end_clean(); } // exemple.html > exemple.html.gz // Compresse les fichiers textes statiques HTML & CSS à la racine exec('/usr/bin/static-compress -c zopfli "*.html" "*.css" "css/*.css"'); } else { echo "Non authentifié·e"; }