mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
add show docs link to config
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* Shows or hides the Docs link in the sidebar based on config.
|
||||
* @param {boolean} show - Whether to show the Docs link.
|
||||
*/
|
||||
setShowDocsLink(show) {
|
||||
const docsLink = document.querySelector('.github-link');
|
||||
if (docsLink) {
|
||||
docsLink.style.display = show ? '' : 'none';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Service responsible for DOM manipulation and UI rendering.
|
||||
* @class DOMService
|
||||
|
||||
@@ -172,6 +172,9 @@ class Documentation {
|
||||
this.loadCustomCSS(data.customCSS);
|
||||
}
|
||||
|
||||
// Show/hide Docs link in sidebar
|
||||
this.domService.setShowDocsLink(data.showDocsLink !== false);
|
||||
|
||||
this.searchService.buildSearchIndex(this.indexData.documents);
|
||||
this.domService.setupSearch(this.searchService);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user