Remove extensionless HTML

This commit is contained in:
Miraty 2022-08-30 16:40:30 +02:00
parent fcbe9541ba
commit a6f86c3a94
2 changed files with 1 additions and 11 deletions

View File

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

View File

@ -18,7 +18,7 @@ else
if (isset($argv[2])) if (isset($argv[2]))
define("DESTINATION", $argv[2]); define("DESTINATION", $argv[2]);
else else
define("DESTINATION", "local"); define("DESTINATION", "dns");
if (file_exists(SITE . "/config.ini")) if (file_exists(SITE . "/config.ini"))
$config = parse_ini_file(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)); 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 // Determine whether links need to use Onion or DNS
function clearnetOrOnion($clearnetUrl, $onionUrl) { function clearnetOrOnion($clearnetUrl, $onionUrl) {
if (DESTINATION === "onion") { if (DESTINATION === "onion") {