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
+41-8Lines changed: 41 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,15 @@
1
-
# sphinx-autodoc2
1
+
# sphinx-autodoc-fern
2
2
3
-
`sphinx-autodoc2` is a Sphinx extension that automatically generates API documentation for your Python packages.
3
+
`sphinx-autodoc-fern` is a Sphinx extension that automatically generates API documentation for your Python packages with **Fern documentation format support**.
This is a fork of [`sphinx-autodoc2`](https://github.com/sphinx-extensions2/sphinx-autodoc2) that adds powerful [Fern](https://buildwithfern.com) documentation generation capabilities.
6
+
7
+
## 🆕 New Fern Features
8
+
9
+
-**Fern-compatible Markdown output** - Generate documentation that works seamlessly with Fern
10
+
-**Enhanced parameter formatting** - Uses Fern's ParamField components for better API documentation
11
+
-**Smart callout handling** - Automatically converts NOTE: and WARNING: to Fern components
12
+
-**Beautiful tables** - Improved formatting for classes, functions, and module contents
7
13
8
14
Static analysis of Python code
9
15
@@ -24,18 +30,45 @@ Support for both `rst` and `md` docstrings
24
30
25
31
Highly configurable
26
32
27
-
: `sphinx-autodoc2` is highly configurable, with many options to control the analysis and output of the documentation.
33
+
: `sphinx-autodoc-fern` is highly configurable, with many options to control the analysis and output of the documentation.
34
+
35
+
Fern Documentation Format Support
36
+
37
+
: Generate beautiful Fern-compatible documentation with enhanced formatting for parameters, callouts, and API references.
28
38
29
39
Decoupled analysis and rendering
30
40
31
41
: The analysis and rendering of the documentation are decoupled, and not dependent on Sphinx.
32
-
: This means that you can use `sphinx-autodoc2` to generate documentation outside of Sphinx (see the `autodoc2` command line tool).
42
+
: This means that you can use `sphinx-autodoc-fern` to generate documentation outside of Sphinx (see the `autodoc2` command line tool).
43
+
44
+
## 🚀 Quick Start with Fern
45
+
46
+
```bash
47
+
pip install sphinx-autodoc-fern
48
+
```
49
+
50
+
To use the Fern renderer:
51
+
52
+
```python
53
+
from autodoc2.render.fern_ import FernRenderer
54
+
55
+
renderer = FernRenderer()
56
+
# Generate Fern-compatible documentation
57
+
```
58
+
59
+
Or use with the CLI:
60
+
61
+
```bash
62
+
autodoc2 --renderer fern your_package/
63
+
```
64
+
65
+
## Acknowledgments
33
66
34
-
See the documentation for more information!
67
+
This project is a fork of the excellent [`sphinx-autodoc2`](https://github.com/sphinx-extensions2/sphinx-autodoc2) by Chris Sewell. All credit for the core functionality goes to the original project.
35
68
36
69
## Design and comparison to sphinx-autoapi
37
70
38
-
I wanted an extension with the following goals:
71
+
The original sphinx-autodoc2 was created with the following goals:
39
72
40
73
- Static analysis of Python code, so things like `if TYPE_CHECKING` were handled correctly
41
74
- Support for MyST docstrings (see <https://github.com/executablebooks/MyST-Parser/issues/228>)
0 commit comments