mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-17 22:01:07 -07:00
docsite: Add 'Edit on GitHub' for module docs (#36667)
This is something I always wanted, a 'Edit on GitHub' button for module documentation. I also removed the additional statement in the footer with instructions on how to edit the module documentation. PS The links go directly into the GitHub file editor now !
This commit is contained in:
parent
fde4cc6219
commit
ba370b178d
5 changed files with 13 additions and 5 deletions
|
@ -240,6 +240,7 @@ def get_plugin_info(module_dir, limit_to=None, verbose=False):
|
|||
|
||||
# save all the information
|
||||
module_info[module] = {'path': module_path,
|
||||
'source': os.path.relpath(module_path, module_dir),
|
||||
'deprecated': deprecated,
|
||||
'aliases': set(),
|
||||
'metadata': metadata,
|
||||
|
@ -413,6 +414,7 @@ def process_plugins(module_map, templates, outputname, output_dir, ansible_versi
|
|||
|
||||
doc['option_keys'] = option_names
|
||||
doc['filename'] = fname
|
||||
doc['source'] = module_map[module]['source']
|
||||
doc['docuri'] = doc['module'].replace('_', '-')
|
||||
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')
|
||||
doc['ansible_version'] = ansible_version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue