diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 77545c996d..2bd7267e46 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -58,7 +58,7 @@ from ansible.utils.display import Display # if a module is added in a version of Ansible older than this, don't print the version added information # in the module documentation because everyone is assumed to be running something newer than this already. -TO_OLD_TO_BE_NOTABLE = 1.3 +TOO_OLD_TO_BE_NOTABLE = 1.3 # Get parent directory of the directory this script lives in MODULEDIR = os.path.abspath(os.path.join( @@ -88,7 +88,7 @@ def rst_ify(text): try: t = _ITALIC.sub(r'*' + r"\1" + r"*", text) t = _BOLD.sub(r'**' + r"\1" + r"**", t) - t = _MODULE.sub(r':ref:`' + r"\1 <\1>" + r"`", t) + t = _MODULE.sub(r':ref:`module_docs/' + r"\1 <\1>" + r"`", t) t = _URL.sub(r"\1", t) t = _CONST.sub(r'``' + r"\1" + r"``", t) except Exception as e: @@ -319,7 +319,7 @@ def too_old(added): except ValueError as e: warnings.warn("Could not parse %s: %s" % (added, str(e))) return False - return added_float < TO_OLD_TO_BE_NOTABLE + return added_float < TOO_OLD_TO_BE_NOTABLE def process_plugins(module_map, templates, outputname, output_dir, ansible_version, plugin_type): diff --git a/docs/docsite/Makefile b/docs/docsite/Makefile index 1c5522dda1..9f8040584b 100644 --- a/docs/docsite/Makefile +++ b/docs/docsite/Makefile @@ -45,6 +45,7 @@ webdocs: docs #TODO: leaving htmlout removal for those having older versions, should eventually be removed also clean: -rm -rf htmlout + -rm -rf module_docs -rm -rf _build -rm -f .buildinfo -rm -f objects.inv @@ -82,7 +83,7 @@ config: PYTHONPATH=../../lib $(CONFIG_DUMPER) --template-file=../templates/config.rst.j2 --output-dir=rst/ -d ../../lib/ansible/config/base.yml modules: $(FORMATTER) ../templates/plugin.rst.j2 - PYTHONPATH=../../lib $(FORMATTER) -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/ $(MODULE_ARGS) + PYTHONPATH=../../lib $(FORMATTER) -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/module_docs/ $(MODULE_ARGS) plugins: $(FORMATTER) ../templates/plugin.rst.j2 @echo "looping over doc plugins" diff --git a/docs/docsite/rst/index.rst b/docs/docsite/rst/index.rst index a08c907293..3658e00d5c 100644 --- a/docs/docsite/rst/index.rst +++ b/docs/docsite/rst/index.rst @@ -23,14 +23,14 @@ Ansible, Inc. releases a new major release of Ansible approximately every two mo .. _an_introduction: .. toctree:: - :maxdepth: 1 + :maxdepth: 2 intro quickstart playbooks playbooks_special_topics modules - modules_by_category + module_docs/modules_by_category vault command_line_tools plugins_by_category