summaryrefslogtreecommitdiffstats
path: root/docs/bin
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2018-02-24 03:57:37 +0100
committerGitHub <noreply@github.com>2018-02-24 03:57:37 +0100
commitba370b178d267bb5976a8da925be482ade7b7f3b (patch)
tree929df89a6e8c67ec549e16a3cae1f474ee678201 /docs/bin
parentguide_aci: Fix a few references (#36666) (diff)
downloadansible-ba370b178d267bb5976a8da925be482ade7b7f3b.tar.xz
ansible-ba370b178d267bb5976a8da925be482ade7b7f3b.zip
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 !
Diffstat (limited to 'docs/bin')
-rwxr-xr-xdocs/bin/plugin_formatter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py
index 603290e507..4d630bfdfa 100755
--- a/docs/bin/plugin_formatter.py
+++ b/docs/bin/plugin_formatter.py
@@ -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