You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+91-8Lines changed: 91 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,19 +278,29 @@ guide.
278
278
279
279
HyperBEAM uses [MkDocs](https://www.mkdocs.org/) with the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme to build its documentation site.
280
280
281
-
Building the documentation requires Python 3, pip, and the following packages:
281
+
Building the documentation requires Python 3 and pip. It's recommended to use a virtual environment:
282
+
282
283
```bash
283
-
pip3 install mkdocs mkdocs-material
284
+
# Create and activate a virtual environment (optional but recommended)
285
+
python3 -m venv venv
286
+
source venv/bin/activate # (macOS/Linux) On Windows use `venv\Scripts\activate`
-**Source Files:** All documentation source files (Markdown `.md`, images, CSS) are located in the `docs/` directory.
287
296
-**Source Code Docs:** Erlang source code documentation is generated using `rebar3 edoc` (with the `edown_doclet` plugin) into the `docs/source-code-docs/` directory as Markdown files. These are then incorporated into the main MkDocs site.
288
297
-**Build Script:** The entire process (compiling, generating edoc, processing source docs, building the site) is handled by the `./docs/build-all.sh` script.
289
298
290
-
To build and view the documentation locally:
299
+
To build the documentation locally:
291
300
292
301
1. Ensure you are in the project root directory.
293
-
2. Run the build script:
302
+
2. If using a virtual environment, make sure it's activated.
303
+
3. Run the build script:
294
304
```bash
295
305
./docs/build-all.sh
296
306
```
@@ -299,9 +309,82 @@ This script performs the following steps:
299
309
- Compiles the Erlang project (`rebar3 compile`).
300
310
- Generates Markdown documentation from source code comments (`rebar3 edoc`) into `docs/source-code-docs/`.
301
311
- Processes the generated source code Markdown files (updates index, cleans up TOCs).
302
-
- Builds the MkDocs site into the `dist/mkdocs` directory (`mkdocs build`).
303
-
- Starts a local development server (`mkdocs serve`) to view the site at `http://127.0.0.1:8000/`.
312
+
- Builds the MkDocs site into the `mkdocs-site` directory (`mkdocs build`).
304
313
305
-
Press `Ctrl+C`inthe terminal where the script is running to stop the local server.
314
+
To view the built documentation locally:
306
315
307
-
The final static site is generated in the `dist/mkdocs` directory, as configured in`mkdocs.yml` (`site_dir: dist/mkdocs`).
316
+
1. Navigate to the site directory:
317
+
```bash
318
+
cd mkdocs-site
319
+
```
320
+
2. Start a simple Python HTTP server:
321
+
```bash
322
+
python3 -m http.server 8000
323
+
```
324
+
3. Open your web browser and go to `http://127.0.0.1:8000/`.
325
+
326
+
Press `Ctrl+C`in the terminal where the server is running to stop it.
327
+
328
+
The final static site is generated in the `mkdocs-site` directory, as configured in`mkdocs.yml` (`site_dir: mkdocs-site`).
329
+
330
+
### Contributing to the Documentation
331
+
332
+
To contribute documentation to HyperBEAM, follow these steps:
333
+
334
+
1. **Fork the Repository**
335
+
- Fork the [HyperBEAM repository](https://github.com/permaweb/HyperBEAM) to your GitHub account
336
+
337
+
2. **Choose the Right Location**
338
+
- Review the existing documentation structure in`./docs/` to determine the appropriate location for your content
339
+
- Documentation is organized into several main sections:
340
+
- `overview/`: High-level concepts and architecture
341
+
- `installation-core/`: Setup and configuration guides
342
+
- `components/`: Detailed component documentation
343
+
- `usage/`: Tutorials and usage guides
344
+
- `resources/`: Reference materials and source code documentation
345
+
- `community/`: Contribution guidelines and community resources
346
+
347
+
3. **Create Your Documentation**
348
+
- Create a new Markdown file (`.md`) in the appropriate directory
349
+
- Follow the existing documentation style and format
350
+
- Use proper Markdown syntax and include:
351
+
- Clear headings and subheadings
352
+
- Code blocks with appropriate language specification
353
+
- Links to related documentation
354
+
- Images (if needed) in the `docs/assets/` directory
355
+
356
+
4. **Update the Navigation**
357
+
- Edit `mkdocs.yml` to add your documentation to the navigation
358
+
- Place your entry in the appropriate section under the `nav:` configuration
- View the documentation locally at `http://127.0.0.1:8000/`
373
+
374
+
6. **Submit a Pull Request**
375
+
- Create a new branch for your documentation changes
376
+
- Commit your changes with a descriptive message
377
+
- Submit a PR with:
378
+
- A clear title describing the documentation addition
379
+
- A detailed description explaining:
380
+
- The purpose of the new documentation
381
+
- Why it should be added to the official docs
382
+
- Any related issues or discussions
383
+
- Screenshots of the rendered documentation (if applicable)
384
+
385
+
7. **Review Process**
386
+
- The HyperBEAM team will review your PR
387
+
- Be prepared to make adjustments based on feedback
388
+
- Once approved, your documentation will be merged into the main repository
389
+
390
+
For more detailed contribution guidelines, see the [Community Guidelines](./docs/community/guidelines.md) and [Development Setup](./docs/community/setup.md) documentation.
0 commit comments