feat(website): implement Clean URLs and split Caddy configurations

- Removed all .html file extension suffixes from website and invite links (impressum, datenschutz, join).
- Updated app.js dynamic localizer and path switching to target Clean URLs ('./', '../', etc.).
- Refactored Caddyfile.example into simple (lightweight try_files) and advanced (hardened production) options.
- Split Caddy configs into Caddyfile (Simple) and Caddyfile (Advanced) tabs on the landing page.
This commit is contained in:
Koala
2026-06-01 00:21:29 +02:00
parent dbf1b3e81b
commit d738352c90
16 changed files with 411 additions and 129 deletions
+7 -7
View File
@@ -194,7 +194,7 @@ document.addEventListener('DOMContentLoaded', () => {
inviteSpan.appendChild(document.createTextNode(' detected!'));
const joinLink = document.createElement('a');
joinLink.href = 'join.html' + window.location.hash;
joinLink.href = 'join' + window.location.hash;
joinLink.className = 'btn-banner';
joinLink.textContent = 'OPEN JOIN PAGE';
@@ -454,9 +454,9 @@ document.addEventListener('DOMContentLoaded', () => {
// Only need to do this dynamic rewrite if we are NOT already inside a localized subdirectory
if (!isSubdir) {
const homeLinks = document.querySelectorAll('a[href="index.html"], a[href="de/index.html"], a[href="fr/index.html"], a[href="es/index.html"], a[href="pt-BR/index.html"], a[href="ru/index.html"]');
const homeLinks = document.querySelectorAll('a[href="./"], a[href="de/"], a[href="fr/"], a[href="es/"], a[href="pt-BR/"], a[href="ru/"]');
homeLinks.forEach(link => {
link.href = (activeLang === 'en') ? 'index.html' : `${activeLang}/index.html`;
link.href = (activeLang === 'en') ? './' : `${activeLang}/`;
});
}
};
@@ -482,17 +482,17 @@ document.addEventListener('DOMContentLoaded', () => {
let targetPath;
if (newLang === 'en') {
if (isSubdir) {
targetPath = '../index.html';
targetPath = '../';
} else {
targetPath = 'index.html';
targetPath = './';
}
} else {
if (isSubdir) {
// Switching from one language subdirectory to another (e.g., /de/ to /fr/)
targetPath = '../' + newLang + '/index.html';
targetPath = '../' + newLang + '/';
} else {
// Switching from root (English) to a language subdirectory (e.g., / to /fr/)
targetPath = newLang + '/index.html';
targetPath = newLang + '/';
}
}