mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
Add dynamic title loading and set default page in index configuration
This commit is contained in:
10
index.js
10
index.js
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user