diff --git a/example.index.json b/example.index.json index a5c0510..8b16978 100644 --- a/example.index.json +++ b/example.index.json @@ -1,4 +1,6 @@ { + "title": "Litruv", + "defaultPage": "welcome", "documents": [ { "title": "Welcome", diff --git a/index.html b/index.html index 7a3e832..d25a317 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - Litruv + <!--title-->> diff --git a/index.js b/index.js index 1c1bcff..21b2f96 100644 --- a/index.js +++ b/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 = {};