Sitelet https://github.com/spazyCZ/bitchat_python/tree/main/docs
Skip to content

Latest commit

 

History

History

README.md

Bitchat Documentation

This directory contains the documentation for the bitchat library, written in Markdown format for better GitHub rendering while maintaining full Sphinx functionality.

Documentation Structure

  • index.md - Main documentation index and overview
  • installation.md - Installation guide for different platforms
  • quickstart.md - Quick start guide with examples
  • examples.md - Comprehensive examples and use cases
  • api.md - Complete API reference
  • contributing.md - Contributing guidelines

Building the Documentation

Prerequisites

Install the required dependencies:

pip install sphinx sphinx-rtd-theme myst-parser

Build Commands

Build HTML documentation:

cd docs
make html

Clean build directory:

make clean

Serve documentation locally:

make serve

This will start a local server at http://localhost:8000

Manual Build

If you don't have make available:

cd docs
sphinx-build -b html . _build/html

Viewing Documentation

On GitHub

All documentation files (.md) render beautifully on GitHub with:

  • Syntax highlighting for code blocks
  • Proper formatting for tables and lists
  • Clickable links and navigation

Local HTML Build

After building with make html, open _build/html/index.html in your browser.

Read the Docs

The documentation is configured to work with Read the Docs hosting service.

Documentation Features

Markdown Support

The documentation uses MyST (Markedly Structured Text) which provides:

  • Full Markdown syntax support
  • Sphinx extensions and features
  • Auto-documentation from Python code
  • Cross-references and linking

Code Examples

All code examples are:

  • Syntax highlighted
  • Tested and working
  • Include complete imports
  • Show real-world usage

Cross-References

The documentation supports:

  • Links between documents
  • API reference links
  • External links to Python documentation
  • Automatic index generation

Contributing to Documentation

Adding New Pages

  1. Create a new .md file in the docs/ directory
  2. Add it to the navigation in index.md
  3. Follow the existing formatting style
  4. Include code examples where appropriate

Updating Existing Pages

  • Use clear, descriptive headings
  • Include practical examples
  • Keep code snippets complete and runnable
  • Update cross-references when moving content

Documentation Style Guide

  • Use clear, concise language
  • Include code examples for all features
  • Provide both basic and advanced usage
  • Include troubleshooting sections where needed
  • Use consistent formatting and structure

Documentation Tools

Sphinx Extensions Used

  • sphinx.ext.autodoc - Auto-generate API docs from docstrings
  • sphinx.ext.napoleon - Google/NumPy style docstring support
  • sphinx.ext.viewcode - Link to source code
  • sphinx.ext.intersphinx - Link to external documentation
  • myst_parser - Markdown support

Theme

The documentation uses the Read the Docs theme for a professional appearance.

Troubleshooting

Build Issues

If you encounter build errors:

  1. Ensure all dependencies are installed
  2. Check that Python modules can be imported
  3. Verify Markdown syntax is correct
  4. Check for broken links or references

Rendering Issues

  • Markdown files render properly on GitHub
  • HTML builds require the full Sphinx build process
  • Some advanced features only work in the HTML build

Links