mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Docs: Add a "seealso" section to the module docs (#45949)
* Docs: Add a separate "seealso" section to the module docs to list related modules and/or related references. This clears up the notes section for things that are actual notes. So you can add a section in your module documentation and four types of references are possible. seealso: # Reference by module name - module: aci_tenant # Reference by module name, including description - module: aci_tenant description: ACI module to create tenants on a Cisco ACI fabric. # Reference by rST documentation anchor - ref: aci_guide description: Detailed information on how to manage your ACI infrastructure using Ansible. # Reference by Internet resource - name: APIC Management Information Model reference description: Complete reference of the APIC object model. link: https://developer.cisco.com/docs/apic-mim-ref/ This PR also includes: - Implements ansible-doc support - Implements schema support for the seealso options - Updates to the development documentation - Rename filter convert_symbols_to_format to rst_ify, cfr the existing html_ify and tty_ify filters - This makes the existing template a lot easier to read and fixes the confusion I had myself rereading the template (again). - We fixed the possible suboption types (which was limited to 'bool' only) * Use latest stable instead of devel docs
This commit is contained in:
parent
6b09e99664
commit
baf0ad2309
9 changed files with 153 additions and 52 deletions
|
@ -69,6 +69,13 @@ def add_fragments(doc, filename, fragment_loader):
|
|||
doc['notes'] = []
|
||||
doc['notes'].extend(notes)
|
||||
|
||||
if 'seealso' in fragment:
|
||||
seealso = fragment.pop('seealso')
|
||||
if seealso:
|
||||
if 'seealso' not in doc:
|
||||
doc['seealso'] = []
|
||||
doc['seealso'].extend(seealso)
|
||||
|
||||
if 'options' not in fragment:
|
||||
raise Exception("missing options in fragment (%s), possibly misformatted?: %s" % (fragment_name, filename))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue