DocHub is a CLI tool for dynamically generating and displaying documentation from Markdown files converted to HTML. It includes real-time updates, search functionality, syntax highlighting, and dark mode support for better readability.
- Real-time Updates: Automatically refreshes content when documentation files are modified.
- Search Functionality: Includes a search bar to filter through documentation content.
- Syntax Highlighting: Uses Highlight.js to format code blocks for better readability.
- Dark Mode: Implements a dark mode theme for improved viewing experience.
To start using DocHub, follow these steps:
-
Installation:
- Ensure Node.js is installed on your system.
-
Initialize Project:
- Run
dochub init [directory]
in your terminal to set up a new DocHub project. - Replace
[directory]
with the path where you want to initialize your documentation project.
- Run
-
Generate Documentation:
- Once initialized, run
dochub serve [directory]
in your terminal. - Replace
[directory]
with the path to your documentation files.
- Once initialized, run
-
View Documentation:
- Open a web browser and navigate to
http://localhost:3000
. - The sidebar lists different sections of your documentation.
- Use the search bar to find specific topics within the documentation.
- Open a web browser and navigate to
The project structure includes:
- HTML and CSS: Main structure and styling managed using HTML and Tailwind CSS.
- JavaScript (Client-side): Handles dynamic content updates, event handling, and integration with external libraries like Socket.IO and Highlight.js.
- Socket.IO: Facilitates real-time communication to update documentation on file changes.
- Markdown to HTML Conversion: Converts Markdown content fetched from the server-side into HTML for rendering.
If you encounter any issues or have questions about using DocHub, feel free to reach out via GitHub Issues.
This project is licensed under the MIT License - see the LICENSE file for details.