diff options
author | Sandra McCann <samccann@redhat.com> | 2020-02-10 11:23:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 10:23:28 -0600 |
commit | 4dd2513371800c649eeb45ea0bd819ac3ebd153b (patch) | |
tree | 19bab65f9f587172753c8baf0f49898a1726e1af /docs | |
parent | fa8c07a33c5afb39ad5b385c70f3b120182cc537 (diff) | |
download | ansible-4dd2513371800c649eeb45ea0bd819ac3ebd153b.tar.gz |
add info on creating doc fragments in a collection (#67171)
* add info on creating doc fragments in a collection
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/dev_guide/developing_collections.rst | 23 | ||||
-rw-r--r-- | docs/docsite/rst/dev_guide/developing_modules_documenting.rst | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/docsite/rst/dev_guide/developing_collections.rst b/docs/docsite/rst/dev_guide/developing_collections.rst index 9088e7b587..35ae7aa980 100644 --- a/docs/docsite/rst/dev_guide/developing_collections.rst +++ b/docs/docsite/rst/dev_guide/developing_collections.rst @@ -212,6 +212,29 @@ Then you can populate the directories with the content you want inside the colle https://github.com/bcoca/collection to get a better idea of what you can place inside a collection. +.. _docfragments_collections: + +Using documentation fragments in collections +-------------------------------------------- + +To include documentation fragments in your collection: + +#. Create the documentation fragment: ``plugins/doc_fragments/fragment_name``. + +#. Refer to the documentation fragment with its FQCN. + +.. code-block:: yaml + + extends_documentation_fragment: + - community.kubernetes.k8s_name_options + - community.kubernetes.k8s_auth_options + - community.kubernetes.k8s_resource_options + - community.kubernetes.k8s_scale_options + +:ref:`module_docs_fragments` covers the basics for documentation fragments. The `kubernetes <https://github.com/ansible-collections/kubernetes>`_ collection includes a complete example. + +You can also share documentation fragments across collections with the FQCN. + .. _building_collections: Building collections diff --git a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst index 0421b4cd1c..134695f2b7 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst @@ -346,6 +346,7 @@ For example, all AWS modules should include: - aws - ec2 +:ref:`docfragments_collections` describes how to incorporate documentation fragments in a collection. .. _examples_block: |