Remove extensionless HTML

main
Miraty 5 months ago
parent fcbe9541ba
commit a6f86c3a94
  1. 1
      README.md
  2. 11
      mkht.php

@ -14,7 +14,6 @@ Optional files:
`mkht.php <site path> <destination>`
`destination` is optionnal and can be:
* `dns` if you want local links without exensions
* `onion` if you want links ending with .onion when available
# Input

@ -18,7 +18,7 @@ else
if (isset($argv[2]))
define("DESTINATION", $argv[2]);
else
define("DESTINATION", "local");
define("DESTINATION", "dns");
if (file_exists(SITE . "/config.ini"))
$config = parse_ini_file(SITE . "/config.ini");
@ -63,15 +63,6 @@ if ($config['css'] == true) {
define("CSS_FILENAME", Less_Cache::Get($lessFiles, $options, $colorScheme));
}
// URLs don't end with .html on the Antopie website
function formerUrlLocale($page) {
if (DESTINATION === "dns" OR DESTINATION === "onion") {
echo $page;
} else {
echo $page . ".html";
}
}
// Determine whether links need to use Onion or DNS
function clearnetOrOnion($clearnetUrl, $onionUrl) {
if (DESTINATION === "onion") {

Loading…
Cancel
Save