Skip to content

Commit 67d35ee

Browse files
committed
Add quickstart section to README
1 parent fbb9b09 commit 67d35ee

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

README.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,37 @@ versions higher than 1.3.
9191

9292

9393
.. _Sphinx: http://www.sphinx-doc.org/en/stable
94+
95+
96+
Quickstart
97+
==========
98+
99+
In order to activate the autodocsumm extension, you have to list it in your
100+
``conf.py``:
101+
102+
.. code-block:: python
103+
:caption: conf.py
104+
105+
extensions = [
106+
'sphinx.ext.autodoc',
107+
...,
108+
'autodocsumm',
109+
]
110+
111+
Once this is done, you can use the ``:autosummary:`` option for autodoc
112+
directives to generate a table at the top, e.g.:
113+
114+
.. code-block:: rst
115+
116+
.. automodule:: my.awesome.module
117+
:autosummary:
118+
119+
Optionally, you can make autodocsumm active by default for all autodoc
120+
directives by adding:
121+
122+
.. code-block:: python
123+
:caption: conf.py
124+
125+
autodoc_default_options = {
126+
'autosummary': True,
127+
}

docs/index.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,40 @@ versions higher than 1.3.
107107
.. _Sphinx: http://www.sphinx-doc.org/en/stable
108108

109109

110+
Quickstart
111+
==========
112+
113+
In order to activate the autodocsumm extension, you have to list it in your
114+
``conf.py``:
115+
116+
.. code-block:: python
117+
:caption: conf.py
118+
119+
extensions = [
120+
'sphinx.ext.autodoc',
121+
...,
122+
'autodocsumm',
123+
]
124+
125+
Once this is done, you can use the ``:autosummary:`` option for autodoc
126+
directives to generate a table at the top, e.g.:
127+
128+
.. code-block:: rst
129+
130+
.. automodule:: my.awesome.module
131+
:autosummary:
132+
133+
Optionally, you can make autodocsumm active by default for all autodoc
134+
directives by adding:
135+
136+
.. code-block:: python
137+
:caption: conf.py
138+
139+
autodoc_default_options = {
140+
'autosummary': True,
141+
}
142+
143+
110144
Indices and tables
111145
==================
112146

0 commit comments

Comments
 (0)