HyperBEAM uses MkDocs with the Material for MkDocs theme to build its documentation site.
Building the documentation requires Python 3 and pip. It's recommended to use a virtual environment:
# Create and activate a virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate # (macOS/Linux) On Windows use `venv\Scripts\activate`
# Install required packages
pip3 install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
# Deactivate the virtual environment when done
# deactivate- Source Files: All documentation source files (Markdown
.md, images, CSS) are located in thedocs/directory. - Source Code Docs: Erlang source code documentation is generated using
rebar3 edoc(with theedown_docletplugin) into thedocs/source-code-docs/directory as Markdown files. These are then incorporated into the main MkDocs site. - Build Script: The entire process (compiling, generating edoc, processing source docs, building the site) is handled by the
./docs/build-all.shscript.
To build the documentation locally:
- Ensure you are in the project root directory.
- If using a virtual environment, make sure it's activated.
- Run the build script:
./docs/build-all.sh
This script performs the following steps:
- Compiles the Erlang project (
rebar3 compile). - Generates Markdown documentation from source code comments (
rebar3 edoc) intodocs/source-code-docs/. - Processes the generated source code Markdown files (updates index, cleans up TOCs).
- Builds the MkDocs site into the
mkdocs-sitedirectory (mkdocs build).
To view the built documentation locally:
- Navigate to the site directory:
cd mkdocs-site - Start a simple Python HTTP server:
python3 -m http.server 8000
- Open your web browser and go to
http://127.0.0.1:8000/.
Press Ctrl+C in the terminal where the server is running to stop it.
The final static site is generated in the mkdocs-site directory, as configured in mkdocs.yml (site_dir: mkdocs-site).
To contribute documentation to HyperBEAM, follow these steps:
-
Fork the Repository
- Fork the HyperBEAM repository to your GitHub account
-
Choose the Right Location
- Review the existing documentation structure in
./docs/to determine the appropriate location for your content - Documentation is organized into several main sections:
overview/: High-level concepts and architectureinstallation-core/: Setup and configuration guidescomponents/: Detailed component documentationusage/: Tutorials and usage guidesresources/: Reference materials and source code documentationcommunity/: Contribution guidelines and community resources
- Review the existing documentation structure in
-
Create Your Documentation
- Create a new Markdown file (
.md) in the appropriate directory - Follow the existing documentation style and format
- Use proper Markdown syntax and include:
- Clear headings and subheadings
- Code blocks with appropriate language specification
- Links to related documentation
- Images (if needed) in the
docs/assets/directory
- Create a new Markdown file (
-
Update the Navigation
- Edit
mkdocs.ymlto add your documentation to the navigation - Place your entry in the appropriate section under the
nav:configuration - Follow the existing indentation and format
- Edit
-
Test Your Changes
- Set up a local development environment:
python3 -m venv venv source venv/bin/activate pip3 install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin - Run the build script to verify your changes:
./docs/build-all.sh
- View the documentation locally at
http://127.0.0.1:8000/
- Set up a local development environment:
-
Submit a Pull Request
- Create a new branch for your documentation changes
- Commit your changes with a descriptive message
- Submit a PR with:
- A clear title describing the documentation addition
- A detailed description explaining:
- The purpose of the new documentation
- Why it should be added to the official docs
- Any related issues or discussions
- Screenshots of the rendered documentation (if applicable)
-
Review Process
- The HyperBEAM team will review your PR
- Be prepared to make adjustments based on feedback
- Once approved, your documentation will be merged into the main repository
For more detailed contribution guidelines, see the Community Guidelines and Development Setup documentation.