Compare commits

...

2 Commits

Author SHA1 Message Date
407ee6c0d3 add show docs link to config 2026-01-02 23:53:44 +11:00
d9a6943570 Add screenshots section to README
Added screenshots section with images for Home, Mobile UI, Live Search, Document Outline Sidebar, and Print-Friendly View.
2026-01-02 23:45:37 +11:00
3 changed files with 29 additions and 1 deletions

View File

@@ -15,6 +15,19 @@ A modern, accessible documentation viewer for Markdown files with live search, n
-**Performance optimized** with document caching and lazy loading
- 📊 **Loading indicators** with animated progress bars
## Screenshots
<p align="center">
<img alt="Home" title="Home Page" src="https://github.com/user-attachments/assets/eb353607-7ce2-47fd-be87-479d9bbdac5c" height="300" />
<img alt="Mobile UI" title="Mobile View" src="https://github.com/user-attachments/assets/b6157ec9-519a-47b6-b487-d5447f599027" height="300" />
<br/>
<img alt="Search" title="Live Search" src="https://github.com/user-attachments/assets/4ae9b7f7-2d99-4668-b6f5-5bd52c135e26" height="300" />
<img alt="Outline" title="Document Outline Sidebar" src="https://github.com/user-attachments/assets/e2d58aa1-e297-4b7e-bec1-d3be5f69f45d" height="300" />
<img alt="Print" title="Print-Friendly View" src="https://github.com/user-attachments/assets/a840be73-ca93-46c6-9fbe-5d498c2c3525" height="300" />
</p>
## Quick Start
1. Install dependencies:
@@ -190,10 +203,10 @@ For improved SEO and social sharing, you can use a Cloudflare Worker to dynamica
### index.json
```json
{
"defaultPage": "home",
"showDocsLink": true,
"metadata": {
"title": "Site Title",
"description": "Site description",
@@ -213,6 +226,8 @@ For improved SEO and social sharing, you can use a Cloudflare Worker to dynamica
}
```
The `showDocsLink` option controls whether a "Docs" link is shown in the UI navigation. Set to `false` to hide it.
The build process generates the documents part for `index.json`
## Contributing

View File

@@ -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

View File

@@ -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);