From 73f6e83445b677e60c205e5a32b4cd1246470e87 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 22:07:36 +0000 Subject: [PATCH] Add .gitignore for docs build artifacts and docs README Co-authored-by: r41k0u <76248539+r41k0u@users.noreply.github.com> --- .gitignore | 4 +++ docs/README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 docs/README.md diff --git a/.gitignore b/.gitignore index fa842d1..bb41570 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ __pycache__/ vmlinux.py ~* vmlinux.h + +# Documentation build artifacts +docs/_build/ +docs/_templates/ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b43e609 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,66 @@ +# PythonBPF Documentation + +This directory contains the Sphinx documentation for PythonBPF. + +## Building the Documentation + +### Prerequisites + +Install the documentation dependencies: + +```bash +pip install -r requirements.txt +# Or install the optional docs dependencies +pip install pythonbpf[docs] +``` + +### Build HTML Documentation + +```bash +make html +``` + +The generated documentation will be in `_build/html/`. Open `_build/html/index.html` in a browser to view. + +### Other Build Formats + +```bash +make latexpdf # Build PDF documentation +make epub # Build ePub format +make clean # Clean build artifacts +``` + +## Documentation Structure + +- `index.md` - Main landing page +- `getting-started/` - Installation and quick start guides +- `user-guide/` - Comprehensive user documentation +- `api/` - API reference documentation +- `conf.py` - Sphinx configuration +- `_static/` - Static files (images, CSS, etc.) + +## Writing Documentation + +Documentation is written in Markdown using [MyST-Parser](https://myst-parser.readthedocs.io/). See the existing files for examples. + +### MyST Markdown Features + +- Standard Markdown syntax +- Directives using `{directive}` syntax +- Cross-references using `{doc}` and `{ref}` +- Admonitions (notes, warnings, tips) +- Code blocks with syntax highlighting + +## Contributing + +When adding new documentation: + +1. Follow the existing structure +2. Use MyST Markdown syntax +3. Include code examples +4. Test the build with `make html` +5. Check for warnings and errors + +## Online Documentation + +The documentation is automatically built and deployed to GitHub Pages (if configured).