mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
update document title assignment to use metadata from JSON
This commit is contained in:
2
index.js
2
index.js
@@ -1,7 +1,7 @@
|
|||||||
fetch('index.json')
|
fetch('index.json')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
document.title = data.title || 'Documentation';
|
document.title = data.metadata.title || 'Documentation';
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error loading title:', error);
|
console.error('Error loading title:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user