update title

This commit is contained in:
2025-02-10 00:10:16 +11:00
parent a7778d54d4
commit 83b9bf68f6

View File

@@ -534,7 +534,7 @@ class Documentation {
// Add this line to populate author info // Add this line to populate author info
this.populateAuthorInfo(data.author); this.populateAuthorInfo(data.author);
window.originalDocTitle = data.title || 'Documentation'; window.originalDocTitle = data.metadata.site_name || 'Documentation';
document.title = window.originalDocTitle; document.title = window.originalDocTitle;
this.domService.elements.fileIndex.innerHTML = ''; this.domService.elements.fileIndex.innerHTML = '';
@@ -618,7 +618,7 @@ class Documentation {
try { try {
const { content, metadata, marked } = await this.documentService.loadDocument(path); 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.setContent(marked.parse(content));
this.domService.updateActiveDocument(path); this.domService.updateActiveDocument(path);