mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
Compare commits
2 Commits
8fbfd2ae77
...
341e4e48ff
| Author | SHA1 | Date | |
|---|---|---|---|
| 341e4e48ff | |||
| 83c7566e6c |
51
README.md
51
README.md
@@ -4,14 +4,16 @@ A modern, accessible documentation viewer for Markdown files with live search, n
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 🔍 Live search with keyboard shortcuts (Alt+S)
|
- 🔍 **Live search** with keyboard shortcuts (Alt+S) and result caching
|
||||||
- 📱 Mobile-friendly responsive design
|
- 📱 **Mobile-friendly** responsive design with focus trap
|
||||||
- 🎯 Keyboard navigation support
|
- 🎯 **Keyboard navigation** support (arrow keys, Enter, Escape)
|
||||||
- 📑 Auto-generated document outline
|
- 📑 **Auto-generated document outline** with collapsible headers
|
||||||
- 🔗 Wiki-style internal linking
|
- 🔗 **Wiki-style internal linking** with `[[Page Title]]` syntax
|
||||||
- 🖨️ Print-friendly styling
|
- 🖨️ **Print-friendly** styling
|
||||||
- ♿ ARIA-compliant accessibility
|
- ♿ **ARIA-compliant accessibility** (aria-current, role attributes, focus management)
|
||||||
- 🌙 Dark theme
|
- 🌙 **Dark theme** with CSS custom properties
|
||||||
|
- ⚡ **Performance optimized** with document caching and lazy loading
|
||||||
|
- 📊 **Loading indicators** with animated progress bars
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
@@ -124,13 +126,30 @@ To use the plugin:
|
|||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
├── docs/ # Documentation files
|
├── docs/ # Documentation files
|
||||||
├── build-docs.js # Documentation builder
|
├── js/ # Application modules
|
||||||
├── index.html # Main viewer
|
│ ├── EventBus.js # Pub-sub event system
|
||||||
├── index.js # Application logic
|
│ ├── IndexService.js # Document index management
|
||||||
└── styles.css # Styling
|
│ ├── SearchService.js # Search with caching
|
||||||
|
│ ├── DOMService.js # DOM manipulation & accessibility
|
||||||
|
│ ├── DocumentService.js # Markdown loading & caching
|
||||||
|
│ ├── NavigationService.js # Browser history handling
|
||||||
|
│ └── Documentation.js # Main orchestrator
|
||||||
|
├── build-docs.js # Documentation builder
|
||||||
|
├── index.html # Main viewer
|
||||||
|
└── styles.css # Styling
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Architecture
|
||||||
|
|
||||||
|
The application uses a modular ES6 architecture with:
|
||||||
|
|
||||||
|
- **EventBus**: Pub-sub pattern for decoupled communication between services
|
||||||
|
- **Services**: Single-responsibility modules for search, DOM, documents, and navigation
|
||||||
|
- **Caching**: LRU caches for search results (50 entries) and documents (20 entries)
|
||||||
|
- **Lazy Loading**: Images use `loading="lazy"` for improved performance
|
||||||
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
The build process:
|
The build process:
|
||||||
@@ -201,6 +220,12 @@ The build process generates the documents part for `index.json`
|
|||||||
2. Create a feature branch
|
2. Create a feature branch
|
||||||
3. Submit a pull request
|
3. Submit a pull request
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- [marked.js](https://marked.js.org/) - Markdown parsing
|
||||||
|
- [highlight.js](https://highlightjs.org/) - Syntax highlighting
|
||||||
|
- [Font Awesome](https://fontawesome.com/) - Icons
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT License - see LICENSE file for details.
|
MIT License - see LICENSE file for details.
|
||||||
|
|||||||
Reference in New Issue
Block a user