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: docs/docsite/rst/community/documentation_contributions.rst
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,22 +175,18 @@ This process compiles all the links but provides minimal log output. If you're w
175
175
Building all the rST pages
176
176
^^^^^^^^^^^^^^^^^^^^^^^^^^
177
177
178
-
To build all the rST files without any module documentation:
178
+
To build all the rST files with almost no module documentation:
179
179
180
180
.. code-block:: bash
181
181
182
-
MODULES=none make webdocs
182
+
make coredocs
183
+
184
+
This is building effectively the ansible-core documentation, as opposed to the Ansible community package documentation, which includes documentation for many collections.
183
185
184
186
Building module docs and rST pages
185
187
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186
188
187
-
To build documentation for a few modules included in ``ansible/ansible`` plus all the rST files, use a comma-separated list:
188
-
189
-
.. code-block:: bash
190
-
191
-
MODULES=one_module,another_module make webdocs
192
-
193
-
To build all the module documentation plus all the rST files:
189
+
To build all the module documentation for the Ansible community package plus all the rST files:
194
190
195
191
.. code-block:: bash
196
192
@@ -207,7 +203,7 @@ Advanced users can build one or more rST files with the sphinx utility directly.
Copy file name to clipboardExpand all lines: docs/docsite/rst/dev_guide/testing_documentation.rst
+8-16Lines changed: 8 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,23 +9,9 @@ Testing plugin documentation
9
9
10
10
A quick test while developing is to use ``ansible-doc -t <plugin_type> <name>`` to see if it renders, you might need to add ``-M /path/to/module`` if the module is not somewhere Ansible expects to find it.
11
11
12
-
Before you submit a plugin for inclusion in Ansible, you must test your documentation for correct HTML rendering and for modules to ensure that the argspec matches the documentation in your Python file.
13
-
The community pages offer more information on :ref:`testing reStructuredText documentation <testing_documentation_locally>`.
12
+
Before you submit a plugin for inclusion in ansible-core, you must run tests to ensure that the argspec matches the documentation in your Python file, and that the argspec's and documentation's structure is correct.
14
13
15
-
For example, to check the HTML output of your module documentation:
16
-
17
-
#. Ensure working :ref:`development environment <environment_setup>`.
18
-
#. Install required Python packages (drop '--user' in venv/virtualenv):
#. Ensure your module is in the correct directory: ``lib/ansible/modules/mymodule.py`` or in a configured path.
26
-
#. Build HTML from your module documentation: ``MODULES=mymodule make webdocs``.
27
-
#. To build the HTML documentation for multiple modules, use a comma-separated list of module names: ``MODULES=mymodule,mymodule2 make webdocs``.
28
-
#. View the HTML page at ``file:///path/to/docs/docsite/_build/html/modules/mymodule_module.html``.
14
+
The community pages offer more information on :ref:`testing reStructuredText documentation <testing_documentation_locally>` if you extend the Ansible documentation with additional RST files.
29
15
30
16
To ensure that your module documentation matches your ``argument_spec``:
31
17
@@ -41,4 +27,10 @@ To ensure that your module documentation matches your ``argument_spec``:
If you have Docker or Podman installed, you can also use them with the ``--docker`` option, which uses an image that already has all requirements installed:
0 commit comments