Add dynamic title loading and set default page in index configuration

This commit is contained in:
2025-02-09 19:18:19 +11:00
parent 790664b610
commit 3c61ab1e2e
3 changed files with 13 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
fetch('index.json')
.then(response => response.json())
.then(data => {
document.title = data.title || 'Documentation';
})
.catch(error => {
console.error('Error loading title:', error);
document.title = 'Documentation';
});
class EventBus {
constructor() {
this.events = {};