Skip to content

Commit 2c2ed47

Browse files
authored
Merge pull request #80 from pythonbpf/copilot/create-documentation-project
Add comprehensive Sphinx documentation with MyST-Parser
2 parents ef128f3 + b6ecec9 commit 2c2ed47

File tree

18 files changed

+3584
-0
lines changed

18 files changed

+3584
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ __pycache__/
1010
vmlinux.py
1111
~*
1212
vmlinux.h
13+
14+
# Documentation build artifacts
15+
docs/_build/
16+
docs/_templates/

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
**Using uv (recommended):**
12+
```bash
13+
uv pip install -r requirements.txt
14+
# Or install the optional docs dependencies
15+
uv pip install pythonbpf[docs]
16+
```
17+
18+
**Using pip:**
19+
```bash
20+
pip install -r requirements.txt
21+
# Or install the optional docs dependencies
22+
pip install pythonbpf[docs]
23+
```
24+
25+
### Build HTML Documentation
26+
27+
```bash
28+
make html
29+
```
30+
31+
The generated documentation will be in `_build/html/`. Open `_build/html/index.html` in a browser to view.
32+
33+
### Other Build Formats
34+
35+
```bash
36+
make latexpdf # Build PDF documentation
37+
make epub # Build ePub format
38+
make clean # Clean build artifacts
39+
```
40+
41+
## Documentation Structure
42+
43+
- `index.md` - Main landing page
44+
- `getting-started/` - Installation and quick start guides
45+
- `user-guide/` - Comprehensive user documentation
46+
- `api/` - API reference documentation
47+
- `conf.py` - Sphinx configuration
48+
- `_static/` - Static files (images, CSS, etc.)
49+
50+
## Writing Documentation
51+
52+
Documentation is written in Markdown using [MyST-Parser](https://myst-parser.readthedocs.io/). See the existing files for examples.

docs/_static/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)