mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-25 03:06:07 +10:00
Compare commits
2 Commits
341e4e48ff
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 407ee6c0d3 | |||
| d9a6943570 |
17
README.md
17
README.md
@@ -15,6 +15,19 @@ A modern, accessible documentation viewer for Markdown files with live search, n
|
|||||||
- ⚡ **Performance optimized** with document caching and lazy loading
|
- ⚡ **Performance optimized** with document caching and lazy loading
|
||||||
- 📊 **Loading indicators** with animated progress bars
|
- 📊 **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
|
## Quick Start
|
||||||
|
|
||||||
1. Install dependencies:
|
1. Install dependencies:
|
||||||
@@ -190,10 +203,10 @@ For improved SEO and social sharing, you can use a Cloudflare Worker to dynamica
|
|||||||
|
|
||||||
### index.json
|
### index.json
|
||||||
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"defaultPage": "home",
|
"defaultPage": "home",
|
||||||
|
"showDocsLink": true,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"title": "Site Title",
|
"title": "Site Title",
|
||||||
"description": "Site description",
|
"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`
|
The build process generates the documents part for `index.json`
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
* Service responsible for DOM manipulation and UI rendering.
|
||||||
* @class DOMService
|
* @class DOMService
|
||||||
|
|||||||
@@ -172,6 +172,9 @@ class Documentation {
|
|||||||
this.loadCustomCSS(data.customCSS);
|
this.loadCustomCSS(data.customCSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show/hide Docs link in sidebar
|
||||||
|
this.domService.setShowDocsLink(data.showDocsLink !== false);
|
||||||
|
|
||||||
this.searchService.buildSearchIndex(this.indexData.documents);
|
this.searchService.buildSearchIndex(this.indexData.documents);
|
||||||
this.domService.setupSearch(this.searchService);
|
this.domService.setupSearch(this.searchService);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user