|
| 1 | +# PythonBPF Documentation |
| 2 | + |
| 3 | +This directory contains the Sphinx documentation for PythonBPF. |
| 4 | + |
| 5 | +## Building the Documentation |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +Install the documentation dependencies: |
| 10 | + |
| 11 | +```bash |
| 12 | +pip install -r requirements.txt |
| 13 | +# Or install the optional docs dependencies |
| 14 | +pip install pythonbpf[docs] |
| 15 | +``` |
| 16 | + |
| 17 | +### Build HTML Documentation |
| 18 | + |
| 19 | +```bash |
| 20 | +make html |
| 21 | +``` |
| 22 | + |
| 23 | +The generated documentation will be in `_build/html/`. Open `_build/html/index.html` in a browser to view. |
| 24 | + |
| 25 | +### Other Build Formats |
| 26 | + |
| 27 | +```bash |
| 28 | +make latexpdf # Build PDF documentation |
| 29 | +make epub # Build ePub format |
| 30 | +make clean # Clean build artifacts |
| 31 | +``` |
| 32 | + |
| 33 | +## Documentation Structure |
| 34 | + |
| 35 | +- `index.md` - Main landing page |
| 36 | +- `getting-started/` - Installation and quick start guides |
| 37 | +- `user-guide/` - Comprehensive user documentation |
| 38 | +- `api/` - API reference documentation |
| 39 | +- `conf.py` - Sphinx configuration |
| 40 | +- `_static/` - Static files (images, CSS, etc.) |
| 41 | + |
| 42 | +## Writing Documentation |
| 43 | + |
| 44 | +Documentation is written in Markdown using [MyST-Parser](https://myst-parser.readthedocs.io/). See the existing files for examples. |
| 45 | + |
| 46 | +### MyST Markdown Features |
| 47 | + |
| 48 | +- Standard Markdown syntax |
| 49 | +- Directives using `{directive}` syntax |
| 50 | +- Cross-references using `{doc}` and `{ref}` |
| 51 | +- Admonitions (notes, warnings, tips) |
| 52 | +- Code blocks with syntax highlighting |
| 53 | + |
| 54 | +## Contributing |
| 55 | + |
| 56 | +When adding new documentation: |
| 57 | + |
| 58 | +1. Follow the existing structure |
| 59 | +2. Use MyST Markdown syntax |
| 60 | +3. Include code examples |
| 61 | +4. Test the build with `make html` |
| 62 | +5. Check for warnings and errors |
| 63 | + |
| 64 | +## Online Documentation |
| 65 | + |
| 66 | +The documentation is automatically built and deployed to GitHub Pages (if configured). |
0 commit comments