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:
Dag Wieers 2018-02-24 03:57:37 +01:00 committed by GitHub
parent fde4cc6219
commit ba370b178d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View file

@ -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