From 83b9bf68f64f59137d5bd0e665e16590cb76dcca Mon Sep 17 00:00:00 2001 From: Litruv Date: Mon, 10 Feb 2025 00:10:16 +1100 Subject: [PATCH] update title --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1a1efe4..95c3739 100644 --- a/index.js +++ b/index.js @@ -534,7 +534,7 @@ class Documentation { // Add this line to populate author info this.populateAuthorInfo(data.author); - window.originalDocTitle = data.title || 'Documentation'; + window.originalDocTitle = data.metadata.site_name || 'Documentation'; document.title = window.originalDocTitle; this.domService.elements.fileIndex.innerHTML = ''; @@ -618,7 +618,7 @@ class Documentation { try { const { content, metadata, marked } = await this.documentService.loadDocument(path); - this.domService.setTitle(metadata.site_name); + this.domService.setTitle(title); this.domService.setContent(marked.parse(content)); this.domService.updateActiveDocument(path);