A modern, accessible documentation viewer for Markdown files with live search, navigation, and mobile support.
- 🔍 Live search with keyboard shortcuts (Alt+S) and result caching
- 📱 Mobile-friendly responsive design with focus trap
- 🎯 Keyboard navigation support (arrow keys, Enter, Escape)
- 📑 Auto-generated document outline with collapsible headers
- 🔗 Wiki-style internal linking with
[[Page Title]]syntax - 🖨️ Print-friendly styling
- ♿ ARIA-compliant accessibility (aria-current, role attributes, focus management)
- 🌙 Dark theme with CSS custom properties
- ⚡ Performance optimized with document caching and lazy loading
- 📊 Loading indicators with animated progress bars
- Install dependencies:
npm install- Copy the example configuration:
cp example.index.json index.jsonThen modify index.json with your site's metadata, author info, and social links.
- Create your documentation structure:
docs/
├── images/ # Place images here
├── index.md # Main landing page
└── ... other .md files
- Build the documentation index:
npm run buildThis will scan your docs folder and update index.json with the document structure.
- Start the development server:
npm start- Place all documentation files in the
docs/directory - Store images and video in
docs/images/ - Use
.mdextension for Markdown files
Each Markdown file can include YAML frontmatter:
---
title: Page Title
description: Page description
sort: 1 # Optional: controls sidebar order
thumbnail: images/thumb.png # Optional: for OG images
---
# Content starts hereTo create sections, make a folder and add a matching Markdown file:
docs/
├── getting-started/
│ ├── getting-started.md # Folder index
│ ├── installation.md
│ └── configuration.md
└── index.md
Use double brackets for internal links:
[[Page Title]]
[[Page Title|Custom Text]]Store images in docs/images/ and reference them:

# or
![[picture.png]]Headers are automatically added to the right sidebar outline and are collapsible.
We recommend using Obsidian.md as your editor for the documentation files. The docs/.obsidian directory includes a custom plugin that provides enhanced editing features:
- Displays page titles in the file explorer instead of filenames
- Shows frontmatter-defined sort order in the file list
- Automatically updates file ordering based on the
sortproperty - Makes folder and document organization more intuitive
To use the plugin:
- Open the
docsfolder as an Obsidian vault - The plugin will be automatically loaded
- The file explorer will now show your document titles and sorting order
.
├── docs/ # Documentation files
├── js/ # Application modules
│ ├── EventBus.js # Pub-sub event system
│ ├── IndexService.js # Document index management
│ ├── 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
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
The build process:
- Scans the
docs/directory - Edits
index.jsonwith document metadata
A GitHub Actions workflow is included that automatically:
- Runs on every push to the master branch
- Executes the build process
- Commits and pushes any changes to
index.json - Ensures your documentation index stays in sync with your content
This means you can edit your documentation directly on GitHub, and the index will be automatically updated.
If you don't want to use Github actions, you can use npm run build
- Create a new repository on GitHub.
- Push your code to the repository.
- Go to Cloudflare Pages and connect your GitHub repository.
- Configure the build settings:
- Production branch:
main(or your main branch name) - Build command: Leave empty
- Build output directory:
/(root)
- Production branch:
- Save and deploy.
For improved SEO and social sharing, you can use a Cloudflare Worker to dynamically generate OG/Twitter tags.
- Create a new Cloudflare Worker using the code in
cloudflare-worker.js. - Set the
SITE_URLenvironment variable to where your site will be located, e.g.,https://example.com/docs/ - Set the
DOCS_URLenvironment variable to the URL where your documentation files are hosted (usually your Cloudflare Pages URL). - Configure a route in your Cloudflare account to route all requests to your Cloudflare Pages site through the worker.
{
"defaultPage": "home",
"showDocsLink": true,
"metadata": {
"title": "Site Title",
"description": "Site description",
"site_name": "Documentation"
},
"author": {
"name": "Author Name",
"role": "Role",
"socials": [
{
"icon": "fab fa-github",
"url": "https://github.com/username",
"title": "GitHub"
}
]
}
}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
- Fork the repository
- Create a feature branch
- Submit a pull request
- marked.js - Markdown parsing
- highlight.js - Syntax highlighting
- Font Awesome - Icons
MIT License - see LICENSE file for details.




