README

DocMD

DocMD is a lightweight tool to generate a static documentation website from Markdown files located in your project's source directories. It creates a navigable HTML structure with an intuitive sidebar, perfect for documenting code or projects, usable locally or on a web server.

Features

Prerequisites

Installation

Clone the project:

# bash
cd /path/to/project
git clone [email protected]:webmarka/docmd.git docmd
cd docmd

Set up the environment:

Example .env:

ENV=dev
LANG=en_US.UTF-8  # Converted to 'en-US' for HTML
INCLUDE_PATHS=src
EXCLUDE_PATHS=.git,.hg
SAVE_DIR=docs
OUTPUT_DIR=docs
BACKUP_DIR=~/.docmd/archives
VENV_PATH=~/.docmd/venv
TEMPLATE=default.html
NAV_TITLE=Documentation
THEME=default
USE_EXTERNAL_ASSETS=False
ROOT_INDEX_TITLE = "Documentation Home"
ROOT_INDEX_SUB_TITLE = "Welcome to the Documentation"
ROOT_INDEX_PROJECT_NAME = "Root"
DEBUG=False

Run the setup and generation script:

./setup.sh

After the first run, you can use the source ./setup.sh command instead and enter into the Python environment at the same time.

Usage

To test on a local server:

# bash
cd docs
python3 -m http.server

Then visit http://localhost:8000.

Troubleshooting

On the first run, you may need to install some packages et the Python environment will be set up. If any problem occurs while running source ./setup.py, use this instead (prevents the terminal to close on error):

# bash
./setup.py

If you want to get a more verbose console output so you can figure out what is going on internally, you can enable the debug mode via your .env file:

DEBUG=True

Customization

Changelog