Repository: ansible-community/antsibull-docs (language: python)

Issue:
Make RST output configurable
Chose between consumption by Sphinx and consumption by ... others? What exactly this others is needs to be defined, but a big use-case would be things like https://github.com/ansible-collections/community.vmware/issues/1770.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/antsibull-docs.yml b/.github/workflows/antsibull-docs.yml
index 3cdd4312..1208dd5f 100644
--- a/.github/workflows/antsibull-docs.yml
+++ b/.github/workflows/antsibull-docs.yml
@@ -38,6 +38,8 @@ jobs:
         include:
           - options: '--use-current --use-html-blobs --no-breadcrumbs community.crypto community.docker'
             python: '3.9'
+          - options: '--use-current --output-format simplified-rst community.crypto community.docker'
+            python: '3.10'
 
     steps:
       - name: Check out antsibull-docs
diff --git a/changelogs/fragments/177-output-format.yml b/changelogs/fragments/177-output-format.yml
new file mode 100644
index 00000000..6666bea3
--- /dev/null
+++ b/changelogs/fragments/177-output-format.yml
@@ -0,0 +1,3 @@
+minor_changes:
+  - "Add support for different output formats. Next to the default format, ``ansible-docsite``, a new **experimental** format ``simplified-rst`` is supported. Experimental means that it will likely change considerably in the next few releases until it stabilizes. Such changes will not be considered breaking changes, and could potentially even be bugfixes (https://github.com/ansible-community/antsibull-docs/pull/177)."
+  - "Add a new subcommand, ``collection-plugins``, for rendering files for all plugins and roles in a collection without any indexes (https://github.com/ansible-community/antsibull-docs/pull/177)."
diff --git a/src/antsibull_docs/cli/antsibull_docs.py b/src/antsibull_docs/cli/antsibull_docs.py
index 8d5034ae..5d40fa42 100644
--- a/src/antsibull_docs/cli/antsibull_docs.py
+++ b/src/antsibull_docs/cli/antsibull_docs.py
@@ -37,6 +37,7 @@
 from ..schemas.app_context import DocsAppContext  # noqa: E402
 from .doc_commands import (  # noqa: E402
     collection,
+    collection_plugins,
     current,
     devel,
     lint_docs,
@@ -57,6 +58,7 @@
     "stable": stable.generate_docs,
     "current": current.generate_docs,
     "collection": collection.generate_docs,
+    "collection-plugins": collection_plugins.generate_docs,
     "plugin": plugin.generate_docs,
     "sphinx-init": sphinx_init.site_init,
     "lint-collection-docs": lint_docs.lint_collection_docs,
@@ -280,6 +282,17 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
         " (Latest version of the collections known to galaxy).",
     )
 
+    output_format_parser = argparse.ArgumentParser(add_help=False)
+    output_format_parser.add_argument(
+        "--output-format",
+        default="ansible-docsite",
+        choices=["ansible-docsite", "simplified-rst"],
+        help="What kind of output format to use. Note that simplified-rst is"
+        " *EXPERIMENTAL*; the output format will likely change considerably"
+        " over the next few versions, and these changes will not be considered"
+        " breaking changes.",
+    )
+
     whole_site_parser = argparse.ArgumentParser(add_help=False)
     whole_site_parser.add_argument(
         "--breadcrumbs",
@@ -371,7 +384,7 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
     #
     current_parser = subparsers.add_parser(
         "current",
-        parents=[docs_parser, whole_site_parser, template_parser],
+        parents=[docs_parser, whole_site_parser, template_parser, output_format_parser],
         description="Generate documentation for the current"
         " installed version of ansible and the current installed"
         " collections",
@@ -388,7 +401,7 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
     #
     collection_parser = subparsers.add_parser(
         "collection",
-        parents=[docs_parser, whole_site_parser, template_parser],
+        parents=[docs_parser, whole_site_parser, template_parser, output_format_parser],
         description="Generate documentation for specified collections",
     )
     collection_parser.add_argument(
@@ -427,7 +440,7 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
     #
     file_parser = subparsers.add_parser(
         "plugin",
-        parents=[docs_parser, template_parser],
+        parents=[docs_parser, template_parser, output_format_parser],
         description="Generate documentation for a single plugin",
     )
     file_parser.add_argument(
@@ -446,12 +459,50 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
         help="The type of the plugin",
     )
 
+    #
+    # Document one or more specified collections
+    #
+    collection_plugins_parser = subparsers.add_parser(
+        "collection-plugins",
+        parents=[docs_parser, template_parser, output_format_parser],
+        description="Generate documentation for all plugins of a specified collection",
+    )
+    collection_plugins_parser.add_argument(
+        "--collection-version",
+        default="@latest",
+        help="The version of the collection to document.  The special"
+        ' version, "@latest" can be used to download and document the'
+        " latest version from galaxy.",
+    )
+    collection_plugins_parser.add_argument(
+        "--use-current",
+        action="store_true",
+        default=False,
+        help="Assumes that the argument is a collection name, and"
+        " that collection has been installed with the current"
+        " version of ansible. Specified --collection-version will be"
+        " ignored.",
+    )
+    collection_plugins_parser.add_argument(
+        "--fqcn-plugin-names",
+        action="store_true",
+        default=False,
+        help="Include the collection name in the plugin file names.",
+    )
+    collection_plugins_parser.add_argument(
+        nargs=1,
+        dest="collection",
+        help="A collection whose plugins to document.  It will be"
+        " downloaded from Galaxy or is assumed to be installed,"
+        " depending on whether --use-current is specified.",
+    )
+
     #
     # Create a Sphinx site template
     #
     sphinx_init_parser = subparsers.add_parser(
         "sphinx-init",
-        parents=[docs_parser, template_parser, whole_site_parser],
+        parents=[docs_parser, template_parser, whole_site_parser, output_format_parser],
         description="Generate a Sphinx site template for a collection docsite",
     )
 
@@ -559,6 +610,7 @@ def parse_args(program_name: str, args: list[str]) -> argparse.Namespace:
     #
     lint_collection_docs_parser = subparsers.add_parser(
         "lint-collection-docs",
+        parents=[output_format_parser],
         description="Collection extra docs linter for inclusion in docsite",
     )
 
diff --git a/src/antsibull_docs/cli/doc_commands/_build.py b/src/antsibull_docs/cli/doc_commands/_build.py
index 882bc7b7..a61d252d 100644
--- a/src/antsibull_docs/cli/doc_commands/_build.py
+++ b/src/antsibull_docs/cli/doc_commands/_build.py
@@ -28,7 +28,7 @@
     load_ansible_config,
 )
 from ...extra_docs import load_collections_extra_docs
-from ...jinja2.environment import OutputFormat
+from ...jinja2 import FilenameGenerator, OutputFormat
 from ...process_docs import (
     get_callback_plugin_contents,
     get_collection_contents,
@@ -53,7 +53,7 @@
 mlog = log.fields(mod=__name__)
 
 
-def generate_docs_for_all_collections(
+def generate_docs_for_all_collections(  # noqa: C901
     venv: VenvRunner | FakeVenvRunner,
     collection_dir: str | None,
     dest_dir: str,
@@ -61,11 +61,15 @@ def generate_docs_for_all_collections(
     *,
     collection_names: list[str] | None = None,
     create_indexes: bool = True,
+    create_collection_indexes: bool = True,
+    add_extra_docs: bool = True,
+    add_redirect_stubs: bool = True,
     squash_hierarchy: bool = False,
     breadcrumbs: bool = True,
     use_html_blobs: bool = False,
     fail_on_error: bool = False,
     for_official_docsite: bool = False,
+    include_collection_name_in_plugins: bool = False,
 ) -> int:
     """
     Create documentation for a set of installed collections.
@@ -80,6 +84,9 @@ def generate_docs_for_all_collections(
                              for these collections will be collected and generated.
     :kwarg create_indexes: Whether to create the collection, namespace, and plugin indexes. By
                            default, they are created.
+    :kwarg create_collection_indexes: Whether to create the per-collection plugin index.
+    :kwarg add_extra_docs: Whether to add extra docs.
+    :kwarg add_redirect_stubs: Whether to create redirect stub files.
     :kwarg squash_hierarchy: If set to ``True``, no directory hierarchy will be used.
                              Undefined behavior if documentation for multiple collections are
                              created.
@@ -91,6 +98,8 @@ def generate_docs_for_all_collections(
         errors, instead of generating error pages.
     :kwarg for_official_docsite: Default False.  Set to True to use wording specific for the
         official docsite on docs.ansible.com.
+    :kwarg include_collection_name_in_plugins: Default False.  Set to True to use the FQCN for
+        plugin files instead of only the part without the collection name.
     :returns: A return code for the program.  See :func:`antsibull.cli.antsibull_docs.main` for
         details on what each code means.
     """
@@ -184,6 +193,10 @@ def generate_docs_for_all_collections(
         "ansible-galaxy collection install {namespace}.{name}",
     )
 
+    filename_generator = FilenameGenerator(
+        include_collection_name_in_plugins=include_collection_name_in_plugins
+    )
+
     # Only build top-level index if requested
     if create_indexes:
         asyncio.run(
@@ -194,6 +207,7 @@ def generate_docs_for_all_collections(
                 collection_url=collection_url,
                 collection_install=collection_install,
                 output_format=output_format,
+                filename_generator=filename_generator,
                 breadcrumbs=breadcrumbs,
                 for_official_docsite=for_official_docsite,
                 referable_envvars=referable_envvars,
@@ -207,6 +221,7 @@ def generate_docs_for_all_collections(
                 collection_url=collection_url,
                 collection_install=collection_install,
                 output_format=output_format,
+                filename_generator=filename_generator,
                 breadcrumbs=breadcrumbs,
                 for_official_docsite=for_official_docsite,
                 referable_envvars=referable_envvars,
@@ -221,6 +236,7 @@ def generate_docs_for_all_collections(
                 collection_url=collection_url,
                 collection_install=collection_install,
                 output_format=output_format,
+                filename_generator=filename_generator,
                 for_official_docsite=for_official_docsite,
                 referable_envvars=referable_envvars,
             )
@@ -233,45 +249,50 @@ def generate_docs_for_all_collections(
                 collection_url=collection_url,
                 collection_install=collection_install,
                 output_format=output_format,
+                filename_generator=filename_generator,
                 for_official_docsite=for_official_docsite,
                 referable_envvars=referable_envvars,
             )
         )
         flog.notice("Finished writing callback plugin indexes")
 
-    asyncio.run(
-        output_indexes(
-            collection_to_plugin_info,
-            dest_dir,
-            collection_url=collection_url,
-            collection_install=collection_install,
-            collection_metadata=collection_metadata,
-            squash_hierarchy=squash_hierarchy,
-            extra_docs_data=extra_docs_data,
-            link_data=link_data,
-            output_format=output_format,
-            breadcrumbs=breadcrumbs,
-            for_official_docsite=for_official_docsite,
-            referable_envvars=referable_envvars,
+    if create_collection_indexes:
+        asyncio.run(
+            output_indexes(
+                collection_to_plugin_info,
+                dest_dir,
+                collection_url=collection_url,
+                collection_install=collection_install,
+                collection_metadata=collection_metadata,
+                squash_hierarchy=squash_hierarchy,
+                extra_docs_data=extra_docs_data,
+                link_data=link_data,
+                output_format=output_format,
+                filename_generator=filename_generator,
+                breadcrumbs=breadcrumbs,
+                for_official_docsite=for_official_docsite,
+                referable_envvars=referable_envvars,
+            )
         )
-    )
-    flog.notice("Finished writing indexes")
+        flog.notice("Finished writing indexes")
 
-    asyncio.run(
-        output_all_plugin_stub_rst(
-            stubs_info,
-            dest_dir,
-            collection_url=collection_url,
-            collection_install=collection_install,
-            collection_metadata=collection_metadata,
-            link_data=link_data,
-            output_format=output_format,
-            squash_hierarchy=squash_hierarchy,
-            for_official_docsite=for_official_docsite,
-            referable_envvars=referable_envvars,
+    if add_redirect_stubs:
+        asyncio.run(
+            output_all_plugin_stub_rst(
+                stubs_info,
+                dest_dir,
+                collection_url=collection_url,
+                collection_install=collection_install,
+                collection_metadata=collection_metadata,
+                link_data=link_data,
+                output_format=output_format,
+                filename_generator=filename_generator,
+                squash_hierarchy=squash_hierarchy,
+                for_official_docsite=for_official_docsite,
+                referable_envvars=referable_envvars,
+            )
         )
-    )
-    flog.debug("Finished writing plugin stubs")
+        flog.debug("Finished writing plugin stubs")
 
     asyncio.run(
         output_all_plugin_rst(
@@ -284,6 +305,7 @@ def generate_docs_for_all_collections(
             collection_metadata=collection_metadata,
             link_data=link_data,
             output_format=output_format,
+            filename_generator=filename_generator,
             squash_hierarchy=squash_hierarchy,
             use_html_blobs=use_html_blobs,
             for_official_docsite=for_official_docsite,
@@ -292,19 +314,25 @@ def generate_docs_for_all_collections(
     )
     flog.debug("Finished writing plugin docs")
 
-    asyncio.run(
-        output_extra_docs(dest_dir, extra_docs_data, squash_hierarchy=squash_hierarchy)
-    )
-    flog.debug("Finished writing extra docs")
+    if add_extra_docs:
+        asyncio.run(
+            output_extra_docs(
+                dest_dir, extra_docs_data, squash_hierarchy=squash_hierarchy
+            )
+        )
+        flog.debug("Finished writing extra docs")
 
-    asyncio.run(
-        output_environment_variables(
-            dest_dir,
-            referenced_env_vars,
-            output_format=output_format,
-            squash_hierarchy=squash_hierarchy,
-            referable_envvars=referable_envvars,
+    if output_format == OutputFormat.ANSIBLE_DOCSITE:
+        asyncio.run(
+            output_environment_variables(
+                dest_dir,
+                referenced_env_vars,
+                output_format=output_format,
+                filename_generator=filename_generator,
+                squash_hierarchy=squash_hierarchy,
+                referable_envvars=referable_envvars,
+            )
         )
-    )
-    flog.debug("Finished writing environment variables")
+        flog.debug("Finished writing environment variables")
+
     return 0
diff --git a/src/antsibull_docs/cli/doc_commands/collection.py b/src/antsibull_docs/cli/doc_commands/collection.py
index a394c944..2d4bf486 100644
--- a/src/antsibull_docs/cli/doc_commands/collection.py
+++ b/src/antsibull_docs/cli/doc_commands/collection.py
@@ -27,8 +27,10 @@
 mlog = log.fields(mod=__name__)
 
 
-def generate_collection_docs(collection_dir: str | None, squash_hierarchy: bool) -> int:
-    flog = mlog.fields(func="generate_current_docs")
+def generate_collection_docs(
+    collection_dir: str | None, output_format: OutputFormat, squash_hierarchy: bool
+) -> int:
+    flog = mlog.fields(func="generate_collection_docs")
     flog.debug("Begin generating docs")
 
     app_ctx = app_context.app_ctx.get()
@@ -39,7 +41,7 @@ def generate_collection_docs(collection_dir: str | None, squash_hierarchy: bool)
         venv,
         collection_dir,
         app_ctx.extra["dest_dir"],
-        OutputFormat.ANSIBLE_DOCSITE,
+        output_format,
         collection_names=app_ctx.extra["collections"],
         create_indexes=app_ctx.indexes and not squash_hierarchy,
         squash_hierarchy=squash_hierarchy,
@@ -117,9 +119,10 @@ def generate_docs() -> int:
     app_ctx = app_context.app_ctx.get()
 
     squash_hierarchy: bool = app_ctx.extra["squash_hierarchy"]
+    output_format = OutputFormat.parse(app_ctx.extra["output_format"])
 
     if app_ctx.extra["use_current"]:
-        return generate_collection_docs(None, squash_hierarchy)
+        return generate_collection_docs(None, output_format, squash_hierarchy)
 
     collection_version = app_ctx.extra["collection_version"]
     if collection_version == "@latest":
@@ -137,7 +140,7 @@ def generate_docs() -> int:
                 collection_cache=app_ctx.collection_cache,
             )
         )
-        # flog.fields(tarballs=collection_tarballs).debug('Download complete')
+        flog.fields(tarballs=collection_tarballs).debug("Download complete")
         flog.notice("Finished retrieving tarballs")
 
         # Install the collections to a directory
@@ -158,4 +161,4 @@ def generate_docs() -> int:
         )
         flog.notice("Finished installing collections")
 
-        return generate_collection_docs(collection_dir, squash_hierarchy)
+        return generate_collection_docs(collection_dir, output_format, squash_hierarchy)
diff --git a/src/antsibull_docs/cli/doc_commands/collection_plugins.py b/src/antsibull_docs/cli/doc_commands/collection_plugins.py
new file mode 100644
index 00000000..d29ec3ce
--- /dev/null
+++ b/src/antsibull_docs/cli/doc_commands/collection_plugins.py
@@ -0,0 +1,119 @@
+# Author: Felix Fontein <felix@fontein.de>
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+# SPDX-FileCopyrightText: 2023, Ansible Project
+"""Build documentation for one or more collections."""
+
+from __future__ import annotations
+
+import asyncio
+import os
+import os.path
+import tempfile
+
+from antsibull_core.collections import install_together
+from antsibull_core.logging import log
+from antsibull_core.venv import FakeVenvRunner
+
+from ... import app_context
+from ...jinja2.environment import OutputFormat
+from ._build import generate_docs_for_all_collections
+from .collection import retrieve
+
+mlog = log.fields(mod=__name__)
+
+
+def generate_collection_plugins_docs(
+    collection_dir: str | None,
+    output_format: OutputFormat,
+    fqcn_plugin_names: bool,
+) -> int:
+    flog = mlog.fields(func="generate_collection_plugins_docs")
+    flog.debug("Begin generating docs")
+
+    app_ctx = app_context.app_ctx.get()
+
+    venv = FakeVenvRunner()
+
+    return generate_docs_for_all_collections(
+        venv,
+        collection_dir,
+        app_ctx.extra["dest_dir"],
+        output_format,
+        collection_names=list(app_ctx.extra["collection"]),
+        create_indexes=False,
+        create_collection_indexes=False,
+        add_extra_docs=False,
+        add_redirect_stubs=False,
+        squash_hierarchy=True,
+        breadcrumbs=app_ctx.breadcrumbs,
+        use_html_blobs=app_ctx.use_html_blobs,
+        fail_on_error=app_ctx.extra["fail_on_error"],
+        include_collection_name_in_plugins=fqcn_plugin_names,
+    )
+
+
+def generate_docs() -> int:
+    """
+    Create documentation for the collection subcommand.
+
+    Creates documentation for one or multiple (currently installed) collections.
+
+    :arg args: The parsed comand line args.
+    :returns: A return code for the program.  See :func:`antsibull.cli.antsibull_docs.main` for
+        details on what each code means.
+    """
+    flog = mlog.fields(func="generate_docs")
+    flog.debug("Begin processing docs")
+
+    app_ctx = app_context.app_ctx.get()
+
+    output_format = OutputFormat.parse(app_ctx.extra["output_format"])
+    fqcn_plugin_names: bool = app_ctx.extra["fqcn_plugin_names"]
+
+    if app_ctx.extra["use_current"]:
+        return generate_collection_plugins_docs(
+            None, output_format, fqcn_plugin_names=fqcn_plugin_names
+        )
+
+    collection_version = app_ctx.extra["collection_version"]
+    if collection_version == "@latest":
+        collection_version = None
+
+    with tempfile.TemporaryDirectory() as tmp_dir:
+        # Retrieve the collections
+        flog.fields(tmp_dir=tmp_dir).info("created tmpdir")
+        collection_tarballs = asyncio.run(
+            retrieve(
+                list(app_ctx.extra["collection"]),
+                collection_version,
+                tmp_dir,
+                galaxy_server=app_ctx.galaxy_url,
+                collection_cache=app_ctx.collection_cache,
+            )
+        )
+        flog.fields(tarballs=collection_tarballs).debug("Download complete")
+        flog.notice("Finished retrieving tarball")
+
+        # Install the collections to a directory
+
+        # Directory that ansible needs to see
+        collection_dir = os.path.join(tmp_dir, "installed")
+        # Directory that the collections will be untarred inside of
+        collection_install_dir = os.path.join(collection_dir, "ansible_collections")
+        # Safe to recursively mkdir because we created the tmp_dir
+        os.makedirs(collection_install_dir, mode=0o700)
+        flog.fields(collection_install_dir=collection_install_dir).debug(
+            "collection install dir"
+        )
+
+        # Install the collections
+        asyncio.run(
+            install_together(list(collection_tarballs.values()), collection_install_dir)
+        )
+        flog.notice("Finished installing collection")
+
+        return generate_collection_plugins_docs(
+            collection_dir, output_format, fqcn_plugin_names=fqcn_plugin_names
+        )
diff --git a/src/antsibull_docs/cli/doc_commands/current.py b/src/antsibull_docs/cli/doc_commands/current.py
index c598f2eb..4c509619 100644
--- a/src/antsibull_docs/cli/doc_commands/current.py
+++ b/src/antsibull_docs/cli/doc_commands/current.py
@@ -32,13 +32,15 @@ def generate_docs() -> int:
 
     app_ctx = app_context.app_ctx.get()
 
+    output_format = OutputFormat.parse(app_ctx.extra["output_format"])
+
     venv = FakeVenvRunner()
 
     return generate_docs_for_all_collections(
         venv,
         app_ctx.extra["collection_dir"],
         app_ctx.extra["dest_dir"],
-        OutputFormat.ANSIBLE_DOCSITE,
+        output_format,
         breadcrumbs=app_ctx.breadcrumbs,
         use_html_blobs=app_ctx.use_html_blobs,
         fail_on_error=app_ctx.extra["fail_on_error"],
diff --git a/src/antsibull_docs/cli/doc_commands/devel.py b/src/antsibull_docs/cli/doc_commands/devel.py
index 2f9b0319..acfb0118 100644
--- a/src/antsibull_docs/cli/doc_commands/devel.py
+++ b/src/antsibull_docs/cli/doc_commands/devel.py
@@ -127,7 +127,7 @@ def generate_docs() -> int:
                 use_installed_ansible_core=use_installed_ansible_core,
             )
         )
-        # flog.fields(tarballs=collection_tarballs).debug('Download complete')
+        flog.fields(tarballs=collection_tarballs).debug("Download complete")
         flog.notice("Finished retrieving tarballs")
 
         # Get the ansible-core location
diff --git a/src/antsibull_docs/cli/doc_commands/lint_docs.py b/src/antsibull_docs/cli/doc_commands/lint_docs.py
index d60719a4..d1bd1fde 100644
--- a/src/antsibull_docs/cli/doc_commands/lint_docs.py
+++ b/src/antsibull_docs/cli/doc_commands/lint_docs.py
@@ -15,6 +15,7 @@
 from ... import app_context
 from ...collection_config import lint_collection_config
 from ...collection_links import lint_collection_links
+from ...jinja2.environment import OutputFormat
 from ...lint_extra_docs import lint_collection_extra_docs_files
 from ...lint_plugin_docs import lint_collection_plugin_docs, lint_core_plugin_docs
 from ...utils.collection_name_transformer import CollectionNameTransformer
@@ -40,6 +41,7 @@ def lint_collection_docs() -> int:
     disallow_unknown_collection_refs = app_ctx.extra["disallow_unknown_collection_refs"]
     skip_rstcheck = app_ctx.extra["skip_rstcheck"]
     disallow_semantic_markup = app_ctx.extra["disallow_semantic_markup"]
+    output_format = OutputFormat.parse(app_ctx.extra["output_format"])
 
     flog.notice("Linting docs config file")
     errors = lint_collection_config(collection_root)
@@ -68,6 +70,7 @@ def lint_collection_docs() -> int:
                 disallow_unknown_collection_refs=disallow_unknown_collection_refs,
                 skip_rstcheck=skip_rstcheck,
                 disallow_semantic_markup=disallow_semantic_markup,
+                output_format=output_format,
             )
         )
 
diff --git a/src/antsibull_docs/cli/doc_commands/plugin.py b/src/antsibull_docs/cli/doc_commands/plugin.py
index ce12b459..e17abe20 100644
--- a/src/antsibull_docs/cli/doc_commands/plugin.py
+++ b/src/antsibull_docs/cli/doc_commands/plugin.py
@@ -26,7 +26,8 @@
 from ...collection_links import CollectionLinks
 from ...docs_parsing import AnsibleCollectionMetadata
 from ...docs_parsing.fqcn import get_fqcn_parts, is_fqcn
-from ...jinja2.environment import OutputFormat, doc_environment
+from ...jinja2 import FilenameGenerator, OutputFormat
+from ...jinja2.environment import doc_environment
 from ...process_docs import normalize_plugin_info
 from ...utils.collection_name_transformer import CollectionNameTransformer
 from ...write_docs.plugins import write_plugin_rst
@@ -41,6 +42,7 @@ def generate_plugin_docs(
     plugin: str,
     output_path: str,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
 ) -> int:
     """
     Render documentation for a locally installed plugin.
@@ -136,6 +138,8 @@ def generate_plugin_docs(
             plugin_tmpl,
             error_tmpl,
             "",
+            output_format,
+            filename_generator,
             path_override=output_path,
             use_html_blobs=app_ctx.use_html_blobs,
         )
@@ -160,6 +164,7 @@ def generate_docs() -> int:
     app_ctx = app_context.app_ctx.get()
     plugin_type: str = app_ctx.extra["plugin_type"]
     plugin_name: str = app_ctx.extra["plugin"][0]
+    output_format = OutputFormat.parse(app_ctx.extra["output_format"])
 
     if not is_fqcn(plugin_name):
         raise NotImplementedError(
@@ -180,11 +185,14 @@ def generate_docs() -> int:
     collection_name = ".".join([namespace, collection])
     plugin_name = ".".join([namespace, collection, plugin])
 
+    filename_generator = FilenameGenerator()
+
     return generate_plugin_docs(
         plugin_type,
         plugin_name,
         collection_name,
         plugin,
         output_path,
-        OutputFormat.ANSIBLE_DOCSITE,
+        output_format,
+        filename_generator,
     )
diff --git a/src/antsibull_docs/cli/doc_commands/sphinx_init.py b/src/antsibull_docs/cli/doc_commands/sphinx_init.py
index 8e13cb30..1dd7e3a2 100644
--- a/src/antsibull_docs/cli/doc_commands/sphinx_init.py
+++ b/src/antsibull_docs/cli/doc_commands/sphinx_init.py
@@ -128,6 +128,7 @@ def site_init() -> int:
     extra_conf = split_kv(app_ctx.extra["extra_conf"])
     extra_html_context = split_kv(app_ctx.extra["extra_html_context"])
     extra_html_theme_options = split_kv(app_ctx.extra["extra_html_theme_options"])
+    output_format = app_ctx.extra["output_format"]
 
     sphinx_theme = "sphinx_ansible_theme"
     sphinx_theme_package = "sphinx-ansible-theme >= 0.9.0"
@@ -174,6 +175,7 @@ def site_init() -> int:
                 extra_conf=extra_conf,
                 extra_html_context=extra_html_context,
                 extra_html_theme_options=extra_html_theme_options,
+                output_format=output_format,
             )
             + "\n"
         )
diff --git a/src/antsibull_docs/cli/doc_commands/stable.py b/src/antsibull_docs/cli/doc_commands/stable.py
index 223cbc6e..a5e55b7a 100644
--- a/src/antsibull_docs/cli/doc_commands/stable.py
+++ b/src/antsibull_docs/cli/doc_commands/stable.py
@@ -129,7 +129,7 @@ def generate_docs() -> int:
                 use_installed_ansible_core=use_installed_ansible_core,
             )
         )
-        # flog.fields(tarballs=collection_tarballs).debug('Download complete')
+        flog.fields(tarballs=collection_tarballs).debug("Download complete")
         flog.notice("Finished retrieving tarballs")
 
         # Get the ansible-core location
diff --git a/src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2 b/src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2
index 0cf87482..0afedaef 100644
--- a/src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2
+++ b/src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2
@@ -323,22 +323,22 @@ See Also
 {% for item in doc['seealso'] %}
 {%   if item.module is defined and item.description %}
    @{ reference_plugin_rst(item['module'], 'module') }@
-       @{ item['description'] | rst_ify }@
+       @{ item['description'] | rst_ify | indent(7) }@
 {%   elif item.module is defined %}
    @{ reference_plugin_rst(item['module'], 'module') }@
        The official documentation on the **@{ item['module'] }@** module.
 {%   elif item.plugin is defined and item.plugin_type is defined and item.description %}
    @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
-       @{ item['description'] | rst_ify }@
+       @{ item['description'] | rst_ify | indent(7) }@
 {%   elif item.plugin is defined and item.plugin_type is defined %}
    @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
        The official documentation on the **@{ item['plugin'] }@** @{ item['plugin_type'] }@ plugin.
 {%   elif item.name is defined and item.link is defined and item.description %}
    `@{ item['name'] }@ <@{ item['link'] }@>`_
-       @{ item['description'] | rst_ify }@
+       @{ item['description'] | rst_ify | indent(7) }@
 {%   elif item.ref is defined and item.description %}
    :ref:`@{ item['ref'] }@`
-       @{ item['description'] | rst_ify }@
+       @{ item['description'] | rst_ify | indent(7) }@
 {%   endif %}
 {% endfor %}
 {% endif %}
diff --git a/src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2 b/src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2
index c20d73f3..062db706 100644
--- a/src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2
+++ b/src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2
@@ -182,22 +182,22 @@ See Also
 {%     for item in ep_doc['seealso'] %}
 {%       if item.module is defined and item.description %}
    @{ reference_plugin_rst(item['module'], 'module') }@
-       @{ item['description'] | rst_ify(role_entrypoint=entry_point) }@
+       @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(7) }@
 {%       elif item.module is defined %}
    @{ reference_plugin_rst(item['module'], 'module') }@
        The official documentation on the **@{ item['module'] }@** module.
 {%       elif item.plugin is defined and item.plugin_type is defined and item.description %}
    @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
-       @{ item['description'] | rst_ify(role_entrypoint=entry_point) }@
+       @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(7) }@
 {%       elif item.plugin is defined and item.plugin_type is defined %}
    @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
        The official documentation on the **@{ item['plugin'] }@** @{ item['plugin_type'] }@ plugin.
 {%       elif item.name is defined and item.link is defined and item.description %}
    `@{ item['name'] }@ <@{ item['link'] }@>`_
-       @{ item['description'] | rst_ify(role_entrypoint=entry_point) }@
+       @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(7) }@
 {%       elif item.ref is defined and item.description %}
    :ref:`@{ item['ref'] }@`
-       @{ item['description'] | rst_ify(role_entrypoint=entry_point) }@
+       @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(7) }@
 {%       endif %}
 {%     endfor %}
 {%   endif %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/list_of_callback_plugins.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/list_of_callback_plugins.rst.j2
new file mode 100644
index 00000000..8c90c16b
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/list_of_callback_plugins.rst.j2
@@ -0,0 +1,22 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+Index of all @{ callback_type | capitalize }@ Callback Plugins
+=============@{ '=' * (callback_type | length) }@=================
+
+See `List of all Callback Plugins <index_callback.rst>`_ for the list of *all* callback plugins.
+
+{% for collection_name, plugins in per_collection_plugins.items() | sort %}
+@{ collection_name }@
+@{ '-' * (collection_name | length) }@
+
+{%   for plugin_name, plugin_desc in plugins.items() | sort %}
+* `@{ collection_name }@.@{ plugin_name }@ <@{ collection_name | replace('.', '/') }@/@{ get_plugin_filename(collection_name ~ '.' ~ plugin_name, 'callback') }@>`_ -- @{ plugin_desc | rst_ify(plugin_fqcn=collection_name ~ '.' ~ plugin_name, plugin_type='callback') }@
+{%   endfor %}
+
+{% else %}
+No public @{ callback_type }@ callback plugin found.
+{% endfor %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections.rst.j2
new file mode 100644
index 00000000..14fb0376
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections.rst.j2
@@ -0,0 +1,18 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+Collection Index
+================
+
+{% if for_official_docsite %}
+These are the collections with docs hosted on `docs.ansible.com <https://docs.ansible.com/>`_.
+{% else %}
+These are the collections documented here.
+{% endif %}
+
+{% for name in collections | sort %}
+* `@{ name }@ <@{ name | replace('.', '/') }@/index.rst>`_
+{% endfor %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections_by_namespace.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections_by_namespace.rst.j2
new file mode 100644
index 00000000..e1e937e9
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/list_of_collections_by_namespace.rst.j2
@@ -0,0 +1,26 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% if not breadcrumbs %}
+:orphan:
+{% endif %}
+
+.. _list_of_collections_@{ namespace }@:
+
+{% set title = 'Collections in the ' ~ (namespace | title) ~ ' Namespace' | rst_ify -%}
+
+@{ title }@
+@{ '=' * title|length }@
+
+{% if for_official_docsite %}
+These are the collections with docs hosted on `docs.ansible.com <https://docs.ansible.com/>`_ in the **@{ namespace }@** namespace.
+{% else %}
+These are the collections documented here in the **@{ namespace }@** namespace.
+{% endif %}
+
+{% for name in collections | sort %}
+* `@{ namespace }@.@{ name }@ <namespace/index.rst>`_
+{% endfor %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/list_of_plugins.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/list_of_plugins.rst.j2
new file mode 100644
index 00000000..4f18ce47
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/list_of_plugins.rst.j2
@@ -0,0 +1,28 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% if plugin_type == 'module' %}
+Index of all Modules
+====================
+{% elif plugin_type == 'role' %}
+Index of all Roles
+==================
+{% else %}
+Index of all @{ plugin_type | capitalize }@ Plugins
+=============@{ '=' * (plugin_type | length) }@========
+{% endif %}
+
+{% for collection_name, plugins in per_collection_plugins.items() | sort %}
+@{ collection_name }@
+@{ '-' * (collection_name | length) }@
+
+{%   for plugin_name, plugin_desc in plugins.items() | sort %}
+* `@{ collection_name }@.@{ plugin_name }@ <@{ collection_name | replace('.', '/') }@/@{ get_plugin_filename(collection_name ~ '.' ~ plugin_name, plugin_type) }@>`_ -- @{ plugin_desc | rst_ify(plugin_fqcn=collection_name ~ '.' ~ plugin_name, plugin_type=plugin_type) }@
+{%   endfor %}
+
+{% else %}
+No {% if plugin_type == 'module' %}module{% elif plugin_type == 'role' %}role{% else %}@{ plugin_type }@ plugin{% endif %} found.
+{% endfor %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/attributes.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/attributes.rst.j2
new file mode 100644
index 00000000..0dee25b1
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/attributes.rst.j2
@@ -0,0 +1,60 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% from 'macros/version_added.rst.j2' import version_added_rst %}
+
+{% macro in_rst(attributes, role_entrypoint=None) %}
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+{% for attribute, data in attributes | dictsort %}
+{#   attribute name #}
+
+  * - .. _ansible_collections.@{plugin_name}@_@{plugin_type}@__attribute-@{ attribute }@:
+
+      **@{ attribute }@**
+
+{#   support #}
+    - 
+{%   if attribute == 'action_group' %}
+      Action group@{ 's' if data.membership | length != 1 else '' }@: \ 
+{%-    for member in data.membership -%}
+           @{- member | rst_ify(role_entrypoint=role_entrypoint) -}@
+{%-        if not loop.last %}, {% endif -%}
+{%-    endfor %}
+{%   elif attribute == 'platform' %}
+      Platform@{ 's' if data.platforms | length != 1 or data.platforms == ['all'] else '' }@: 
+{%-    for platform in data.platforms -%}
+           @{- platform | rst_ify(role_entrypoint=role_entrypoint) -}@
+{%-      if not loop.last %}, {% endif -%}
+{%-    endfor %}
+{%   else %}
+      Support: @{ data.support }@
+{%   endif %}
+
+{%   if data['version_added'] is still_relevant(collection=data['version_added_collection'] or collection) %}
+
+      added in @{ version_added_rst(data['version_added'], data['version_added_collection'] or collection) }@
+{%   endif %}
+
+{%   for desc in data['details'] %}
+      @{ desc | rst_ify(role_entrypoint=role_entrypoint) | indent(6) }@
+
+{%   endfor %}
+
+{#   description #}
+    - 
+{% for desc in data['description'] %}
+      @{ desc | rst_ify(role_entrypoint=role_entrypoint) | indent(6) }@
+
+{%   endfor %}
+
+{% endfor %}
+{% endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/choiceslist.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/choiceslist.rst.j2
new file mode 100644
index 00000000..10a811d5
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/choiceslist.rst.j2
@@ -0,0 +1,33 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% macro in_html(choices, default_value=None, has_no_default=False, role_entrypoint=None) %}
+      <ul>
+{%   if choices is mapping %}
+{%     for choice, desc in choices | dictsort %}
+        <li>
+{%       if not has_no_default and ((default_value is not list and default_value == choice) or (default_value is list and choice in default_value)) %}
+          <p><code style="color: blue;"><b>@{ choice | antsibull_to_json | escape }@</b></code> <span style="color: blue;">(default)</span>:
+{%       else %}
+          <p><code>@{ choice | antsibull_to_json | escape }@</code>:
+{%       endif %}
+          @{ desc | first | default('') | html_ify(role_entrypoint=role_entrypoint) | indent(10, blank=true) }@</p>
+{%       for line in desc[1:] %}
+          <p>@{ line | html_ify(role_entrypoint=role_entrypoint) | indent(10, blank=true) }@</p>
+{%       endfor %}
+        </li>
+{%     endfor %}
+{%   else %}
+{%     for choice in choices %}
+{%       if not has_no_default and ((default_value is not list and default_value == choice) or (default_value is list and choice in default_value)) %}
+        <li><p><code style="color: blue;"><b>@{ choice | antsibull_to_json | escape }@</b></code> <span style="color: blue;">← (default)</span></p></li>
+{%       else %}
+        <li><p><code>@{ choice | antsibull_to_json | escape }@</code></p></li>
+{%       endif %}
+{%     endfor %}
+{%   endif %}
+      </ul>
+{% endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/deprecates.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/deprecates.rst.j2
new file mode 100644
index 00000000..70cb4d13
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/deprecates.rst.j2
@@ -0,0 +1,24 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% macro in_html(data, collection, role_entrypoint=None) %}
+{%   if data %}
+  <p>
+{%-    if data['removed_at_date'] -%}
+Removed in: major release after @{ data['removed_at_date'] | html_ify(role_entrypoint=role_entrypoint) }@
+{%-    elif data['removed_in'] -%}
+Removed in: version @{ data['removed_in'] | html_ify(role_entrypoint=role_entrypoint) }@
+{%-    else -%}
+Removed in: a future release
+{%-    endif -%}
+{%-    if data['removed_from_collection'] and data['removed_from_collection'] != collection %}
+ of @{ data['removed_from_collection'] | html_ify(role_entrypoint=role_entrypoint) }@
+{%-    endif -%}
+  </p>
+  <p>@{ 'Why: ' ~ data['why'] | html_ify(role_entrypoint=role_entrypoint) | indent(2, blank=true) }@</p>
+  <p>@{ 'Alternative: ' ~ data['alternative'] | html_ify(role_entrypoint=role_entrypoint) | indent(2, blank=true) }@</p>
+{%   endif %}
+{% endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/parameters.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/parameters.rst.j2
new file mode 100644
index 00000000..5994bc5a
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/parameters.rst.j2
@@ -0,0 +1,141 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% from 'macros/choiceslist.rst.j2' import in_html as choices_html %}
+{% from 'macros/deprecates.rst.j2' import in_html as deprecates_html with context %}
+{% from 'macros/version_added.rst.j2' import version_added_html %}
+
+{% macro in_html(elements, suboption_key='suboptions', parameter_html_prefix='', parameter_rst_prefix='', role_entrypoint=None) %}
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+  {% set table_depth = elements | suboption_depth(suboption_key) %}
+  <tr>
+    <th{% if table_depth > 1 %} colspan="@{ table_depth }@"{% endif %}><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+{% set row_class = cycler('even', 'odd') %}
+{% for key, value in elements recursive %}
+{#   parameter name with required and/or introduced label #}
+  <tr>
+{%   for i in range(1, loop.depth) %}
+    <td></td>
+{%   endfor %}
+    <td{% if table_depth > loop.depth %} colspan="@{ table_depth - loop.depth0 }@"{% endif %} valign="top">
+{%   for full_key in value['full_keys'] %}
+      <div class="ansibleOptionAnchor" id="parameter-@{ parameter_html_prefix }@{% for part in full_key %}@{ part | urlencode }@{% if not loop.last %}/{% endif %}{% endfor %}"></div>
+{%   endfor %}
+      <p style="display: inline;"><strong>@{ key | escape }@</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-@{ parameter_html_prefix }@{% for part in value['full_key'] %}@{ part | urlencode }@{% if not loop.last %}/{% endif %}{% endfor %}" title="Permalink to this option"></a>
+{%   if value['aliases'] %}
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: @{ value['aliases']|join(', ') }@</span></p>
+{%   endif %}
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">@{ value['type'] | documented_type }@</span>
+{%   if value['type'] == 'list' and value['elements'] is not none %}
+        / <span style="color: purple;">elements=@{ value['elements'] | documented_type }@</span>
+{%   endif %}
+{%   if value['required'] %}
+        / <span style="color: red;">required</span>
+{%   endif %}
+      </p>
+{%   if value['version_added'] is still_relevant(collection=value['version_added_collection'] or collection) %}
+      <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(value['version_added'], value['version_added_collection'] or collection) }@</i></p>
+{%   endif %}
+{%   if plugin_type != 'module' %}
+@{     deprecates_html(value['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+{%   endif %}
+    </td>
+{#   description #}
+    <td valign="top">
+{%   for desc in value['description'] %}
+      <p>@{ desc | html_ify(role_entrypoint=role_entrypoint) | indent(6, blank=true) }@</p>
+{%   endfor %}
+{#   default / choices #}
+{%   if value['type'] == 'bool' %}
+{%     set _x = value.update({'choices': [false, true]}) %}
+{%   endif %}
+{#   Show possible choices and highlight details #}
+{%   if value['choices'] %}
+      <p style="margin-top: 8px;"><b">Choices:</b></p>
+@{     choices_html(value['choices'], value['default'], role_entrypoint=role_entrypoint) }@
+{%   endif %}
+{#   Show default value, when multiple choice or no choices #}
+{%   if value['default'] is not none and value['default'] not in value['choices'] %}
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">@{ value['default'] | antsibull_to_json | escape | indent(6, blank=true) }@</code></p>
+{%   endif %}
+{#   Configuration #}
+{%   if plugin_type != 'module' and plugin_type != 'role' and (value['ini'] or value['env'] or value['vars'] or value['cli']) %}
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+{%     if value['ini'] %}
+      <li>
+        <p>INI {% if value['ini'] | length == 1 %}entry{% else %}entries{% endif %}</p>
+{%       for ini in value['ini'] %}
+        <pre>[@{ ini['section'] | escape }@]
+{%         if value['default'] is none %}
+  @{ ini['key'] | escape }@ = VALUE</pre>
+{%         else %}
+  @{ ini['key'] | escape }@ = @{ value['default'] | antsibull_to_ini_value | escape }@</pre>
+{%         endif %}
+{%         if ini['version_added'] is still_relevant(collection=ini['version_added_collection'] or collection) %}
+        <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(ini['version_added'], ini['version_added_collection'] or collection) }@</i></p>
+{%         endif %}
+@{         deprecates_html(ini['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+{%       endfor %}
+      </li>
+{%     endif %}
+{%     for env in value['env'] %}
+      <li>
+        <p>Environment variable: <code>@{ env['name'] | escape }@</code></p>
+{%       if env['version_added'] is still_relevant(collection=env['version_added_collection'] or collection) %}
+        <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(env['version_added'], env['version_added_collection'] or collection) }@</i></p>
+{%       endif %}
+@{       deprecates_html(env['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+      </li>
+{%     endfor %}
+{%     for myvar in value['vars'] %}
+      <li>
+        <p>Variable: @{ myvar['name'] | escape }@</p>
+{%       if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
+        <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(myvar['version_added'], myvar['version_added_collection'] or collection) }@</i></p>
+{%       endif %}
+@{       deprecates_html(myvar['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+      </li>
+{%     endfor %}
+{%     for kw in value['keyword'] %}
+      <li>
+        <p>Keyword: @{ kw['name'] | escape }@</p>
+{%       if kw['version_added'] is still_relevant(collection=kw['version_added_collection'] or collection) %}
+        <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(kw['version_added'], kw['version_added_collection'] or collection) }@</i></p>
+{%       endif %}
+@{       deprecates_html(kw['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+      </li>
+{%     endfor %}
+{%     for mycli in value['cli'] %}
+      <li>
+        <p>CLI argument: @{ mycli['option'] | escape }@</p>
+{%       if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
+        <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(mycli['version_added'], mycli['version_added_collection'] or collection) }@</i></p>
+{%       endif %}
+@{       deprecates_html(mycli['deprecated'], collection, role_entrypoint=role_entrypoint) }@
+      </li>
+{%     endfor %}
+      </ul>
+{%   endif %}
+    </td>
+  </tr>
+{%   if value[suboption_key] %}
+@{     loop(value[suboption_key] | dictsort) }@
+{%   endif %}
+{% endfor %}
+  </tbody>
+  </table>
+
+{% endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/returnvalues.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/returnvalues.rst.j2
new file mode 100644
index 00000000..603e4a63
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/returnvalues.rst.j2
@@ -0,0 +1,70 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% from 'macros/choiceslist.rst.j2' import in_html as choices_html %}
+{% from 'macros/version_added.rst.j2' import version_added_html %}
+
+{% macro in_html(elements, role_entrypoint=None) %}
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+  {% set table_depth = elements | suboption_depth('contains') %}
+  <tr>
+    <th{% if table_depth > 1 %} colspan="@{ table_depth }@"{% endif %}><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+{% set row_class = cycler('even', 'odd') %}
+{% for key, value in elements recursive %}
+{#   return value name #}
+  <tr>
+{%   for i in range(1, loop.depth) %}
+    <td></td>
+{%   endfor %}
+    <td{% if table_depth > loop.depth %} colspan="@{ table_depth - loop.depth0 }@"{% endif %} valign="top">
+{%   for full_key in value['full_keys'] %}
+      <div class="ansibleOptionAnchor" id="return-{% for part in full_key %}@{ part | urlencode }@{% if not loop.last %}/{% endif %}{% endfor %}"></div>
+{%   endfor %}
+      <p style="display: inline;"><strong>@{ key | escape }@</strong></p>
+      <a class="ansibleOptionLink" href="#return-{% for part in value['full_key'] %}@{ part | urlencode }@{% if not loop.last %}/{% endif %}{% endfor %}" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">@{ value['type'] | documented_type }@</span>
+{%   if value['type'] == 'list' and value['elements'] is not none %}
+        / <span style="color: purple;">elements=@{ value['elements'] | documented_type }@</span>
+{%   endif %}
+      </p>
+{%   if value['version_added'] is still_relevant(collection=value['version_added_collection'] or collection) %}
+      <p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(value['version_added'], value['version_added_collection'] or collection) }@</i></p>
+{%   endif %}
+    </td>
+{#   description #}
+    <td valign="top">
+{%   for desc in value['description'] %}
+      <p>@{ desc | html_ify(role_entrypoint=role_entrypoint) | indent(6, blank=true) }@</p>
+{%   endfor %}
+{%   if value['returned'] %}
+      <p style="margin-top: 8px;"><b>Returned:</b> @{ value['returned'] | html_ify(role_entrypoint=role_entrypoint) | indent(6, blank=true) }@</p>
+{%   endif %}
+{#   Show possible choices and highlight details #}
+{%   if value['choices'] %}
+      <p style="margin-top: 8px;"><b>Can only return:</b></p>
+@{     choices_html(value['choices'], has_no_default=True, role_entrypoint=role_entrypoint) }@
+{%   endif %}
+{%   if value['sample'] is not none %}
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>@{ value['sample'] | antsibull_to_json | escape | indent(6, blank=true) }@</code></p>
+{%   endif %}
+    </td>
+  </tr>
+{%   if value['contains'] %}
+@{     loop(value['contains'] | dictsort) }@
+{%   endif %}
+{% endfor %}
+  </tbody>
+  </table>
+
+{% endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/macros/version_added.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/macros/version_added.rst.j2
new file mode 100644
index 00000000..808cab68
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/macros/version_added.rst.j2
@@ -0,0 +1,41 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% macro ansible_name(version) -%}
+{%-  if version.startswith('2.10.') -%}
+ansible-base
+{%-  elif version.startswith('0.') or version.startswith('1.') or (version.startswith('2.') and (version | length == 3 or version[3] == '.')) -%}
+Ansible
+{%-  elif version.startswith('2.10.') or version == '2.10' -%}
+ansible-base
+{%-  else -%}
+ansible-core
+{%-  endif -%}
+{%- endmacro %}
+
+{% macro version_added_rst(version_added, version_added_collection=None, do_not_escape_first_word=False) -%}
+{%-   if version_added_collection == 'ansible.builtin' -%}
+@{      ansible_name(version_added) }@ @{ version_added | rst_escape }@
+{%-   elif version_added_collection and do_not_escape_first_word -%}
+@{      version_added_collection }@ @{ version_added | rst_escape }@
+{%-   elif version_added_collection -%}
+@{      version_added_collection | rst_escape }@ @{ version_added | rst_escape }@
+{%-   elif do_not_escape_first_word -%}
+@{      version_added }@
+{%-   else -%}
+@{      version_added | rst_escape }@
+{%-   endif -%}
+{%- endmacro %}
+
+{% macro version_added_html(version_added, version_added_collection=None) -%}
+{%-   if version_added_collection == 'ansible.builtin' -%}
+@{      ansible_name(version_added) }@ @{ version_added | escape }@
+{%-   elif version_added_collection -%}
+@{      version_added_collection | escape }@ @{ version_added | escape }@
+{%-   else -%}
+@{      version_added | escape }@
+{%-   endif -%}
+{%- endmacro %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugin-deprecation.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugin-deprecation.rst.j2
new file mode 100644
index 00000000..37b757cb
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugin-deprecation.rst.j2
@@ -0,0 +1,17 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% if short_description %}
+{%   set title = alias ~ ' ' ~ plugin_type ~ ' -- ' ~ short_description | rst_ify %}
+{% else %}
+{%   set title = alias ~ ' ' ~ plugin_type %}
+{% endif %}
+
+@{ title }@
+@{ '+' * title|length }@
+
+This is an alias for the @{ module }@ @{ plugin_type }@.
+This name has been **deprecated**. Please update your tasks to use the new name ``@{ module }@`` instead.
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugin-error.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugin-error.rst.j2
new file mode 100644
index 00000000..f3e35bea
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugin-error.rst.j2
@@ -0,0 +1,23 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% set title = plugin_name ~ ' ' ~ plugin_type -%}
+
+@{ title }@
+@{ '+' * title|length }@
+
+The documentation for the @{ plugin_type }@ plugin, @{ plugin_name }@, was malformed.
+
+The errors were:
+
+{% for error in nonfatal_errors %}
+* ::
+
+@{   error | indent(width=8, first=True) }@
+
+{% endfor %}
+
+File a bug with the `@{ collection }@ collection <@{ collection_issue_tracker or (collection | collection_url) }@>`_ in order to have it corrected.
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugin-redirect.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugin-redirect.rst.j2
new file mode 100644
index 00000000..7d270e54
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugin-redirect.rst.j2
@@ -0,0 +1,47 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% set title = plugin_name ~ ' ' ~ plugin_type -%}
+
+@{ title }@
+@{ '+' * title|length }@
+
+{% if collection == 'ansible.builtin' -%}
+- This redirect is part of ``ansible-core`` and included in all Ansible
+  installations. In most cases, you can use the short module name
+  @{ plugin_name.rsplit('.', 1)[-1] }@ even without specifying the ``collections:`` keyword.
+  Despite that, we recommend you use the FQCN for easy linking to the module
+  documentation and to avoid conflicting with other collections that may have
+  the same module name.
+{% else %}
+- This redirect is part of the `@{collection}@ collection <@{ collection | collection_url }@>`_{% if collection_version %} (version @{ collection_version }@){% endif %}.
+
+{%   if not deprecation %}
+  To use it in a playbook, specify: :code:`@{plugin_name}@`.
+{%   endif %}
+{% endif %}
+
+{% if deprecation %}
+- This redirect has been **deprecated**. Please update your tasks to use the new name ``@{ redirect }@`` instead.
+{%   if deprecation.removal_version is defined %}
+  It will be removed in version @{ deprecation.removal_version | rst_ify }@ of @{ collection }@.
+{%   elif deprecation.removal_date is defined %}
+  It will be removed in a major release after @{ deprecation.removal_date | rst_ify }@ of @{ collection }@.
+{%   else %}
+  It will eventually be removed from @{ collection_name }@.
+{%   endif %}
+{% endif %}
+- This is a redirect to the @{ redirect }@ {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %}.
+{% if collection != 'ansible.builtin' -%}
+{%   if redirect_is_symlink %}
+- This redirect also works with Ansible 2.9.
+{%   else %}
+- This redirect does **not** work with Ansible 2.9.
+{%   endif %}
+{% endif %}
+{% if deprecation and deprecation.warning_text is defined %}
+- The collection contains the following information on this deprecation: @{ deprecation.warning_text | rst_ify }@
+{% endif %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugin-tombstone.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugin-tombstone.rst.j2
new file mode 100644
index 00000000..b8fc08a2
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugin-tombstone.rst.j2
@@ -0,0 +1,26 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+@{ plugin_name }@
+@{ '+' * plugin_name|length }@
+
+{% if collection == 'ansible.builtin' -%}
+This module was part of ``ansible-core`` and was included in all Ansible installations.
+{% else %}
+This plugin was part of the `@{collection}@ collection <@{ collection | collection_url }@>`_{% if collection_version %} (version @{ collection_version }@){% endif %}.
+{% endif %}
+
+This {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %} has been removed
+{% if tombstone.removal_version is defined %}
+in version @{ tombstone.removal_version | rst_ify }@ of @{ collection }@.
+{% elif tombstone.removal_date is defined %}
+in a major release after @{ tombstone.removal_date | rst_ify }@ of @{ collection }@.
+{% else %}
+from @{ collection_name }@.
+{% endif %}
+{% if tombstone.warning_text is defined %}
+@{   tombstone.warning_text | rst_ify }@
+{% endif %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2
new file mode 100644
index 00000000..9784613b
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2
@@ -0,0 +1,357 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% from 'macros/attributes.rst.j2' import in_rst as attributes_rst with context %}
+{% from 'macros/parameters.rst.j2' import in_html as parameters_html with context %}
+{% from 'macros/returnvalues.rst.j2' import in_html as return_docs_html with context %}
+{% from 'macros/version_added.rst.j2' import version_added_rst %}
+{% set has_positional_parameters = false %}
+{% set has_keyword_parameters = false %}
+
+{% if doc['short_description'] -%}
+{%   set title = plugin_name ~ ' ' ~ plugin_type ~ ' -- ' ~ doc['short_description'] | rst_ify -%}
+{% else -%}
+{%   set title = plugin_name ~ ' ' ~ plugin_type -%}
+{% endif -%}
+
+@{ title }@
+@{ '+' * title|length }@
+
+{% if collection == 'ansible.builtin' -%}
+This {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %}
+is part of ``ansible-core`` and included in all Ansible
+installations. In most cases, you can use the short
+{% if plugin_type == 'module' %}module{% else %}plugin{% endif %} name
+``@{ plugin_name.rsplit('.', 1)[-1] }@`` even without specifying the ``collections:`` keyword.
+However, we recommend you use the FQCN for easy linking to the
+{% if plugin_type == 'module' %}module{% else %}plugin{% endif %}
+documentation and to avoid conflicting with other collections that may have
+the same {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %} name.
+{% else %}
+This {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %} is part of the `@{collection}@ collection <@{ collection | collection_url }@>`_{% if collection_version %} (version @{ collection_version }@){% endif %}.
+{%   if for_official_docsite %}
+
+You might already have this collection installed if you are using the ``ansible`` package.
+It is not included in ``ansible-core``.
+To check whether it is installed, run :code:`ansible-galaxy collection list`.
+{%   endif %}
+
+To install it, use: @{ collection | collection_install | rst_code }@.
+{%   if doc['requirements'] %}
+You need further requirements to be able to use this {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %},
+see `Requirements <ansible_collections.@{plugin_name}@_@{plugin_type}@_requirements_>`_ for details.
+{%   endif %}
+
+To use it in a playbook, specify: :code:`@{plugin_name}@`.
+{% endif %}
+
+{% if doc['version_added'] is still_relevant(collection=doc['version_added_collection'] or collection) -%}
+New in @{ version_added_rst(doc['version_added'], doc['version_added_collection'] or collection) }@
+{% endif %}
+
+.. contents::
+   :local:
+   :depth: 1
+
+{% if doc['deprecated'] -%}
+DEPRECATED
+----------
+{% if doc['deprecated']['removed_at_date'] %}
+:Removed in: major release after @{ doc['deprecated']['removed_at_date'] | rst_ify }@
+{% elif doc['deprecated']['removed_in'] %}
+:Removed in: version @{ doc['deprecated']['removed_in'] | rst_ify }@
+{% else %}
+:Removed in: a future release
+{% endif %}
+{% if doc['deprecated']['removed_from_collection'] and doc['deprecated']['removed_from_collection'] != collection %}
+             of @{ doc['deprecated']['removed_from_collection'] | rst_ify }@
+{% endif %}
+:Why: @{ doc['deprecated']['why'] | rst_ify | indent(6) }@
+:Alternative: @{ doc['deprecated']['alternative'] | rst_ify | indent(14) }@
+{% endif %}
+
+{% if plugin_type == 'callback' %}
+Callback plugin
+---------------
+
+{%   if doc['type'] == 'stdout' %}
+This plugin is a **stdout callback**. You can use only use one stdout callback at a time. Additional aggregate or notification callbacks can be enabled though.
+{%   elif doc['type'] == 'aggregate' %}
+This plugin is an **aggregate callback**. It adds additional console output next to the configured stdout callback.
+{%   elif doc['type'] == 'notification' %}
+This plugin is a **notification callback**. It sends information for a playbook run to other applications, services, or systems.
+{%   endif %}
+
+{% endif %}
+Synopsis
+--------
+
+{%   for desc in doc['description'] -%}
+- @{ desc | rst_ify | indent(width=2) }@
+{%   endfor %}
+
+{% if doc['has_action'] %}
+This module has a corresponding action plugin.
+{% endif %}
+
+{% if doc['aliases'] -%}
+Aliases: @{ ', '.join(doc['aliases'] | sort) }@
+{% endif %}
+
+{% if doc['requirements'] -%}
+.. _ansible_collections.@{plugin_name}@_@{plugin_type}@_requirements:
+
+Requirements
+------------
+{%   if plugin_type in ('module', 'module_util') %}
+The below requirements are needed on the host that executes this @{ plugin_type }@.
+{%   else %}
+The below requirements are needed on the local controller node that executes this @{ plugin_type }@.
+{%   endif %}
+
+{%   for req in doc['requirements'] %}
+- @{ req | rst_ify | indent(width=2) }@
+{%   endfor %}
+
+{% endif %}
+
+{% set options_to_skip = [] %}
+
+{% if doc['options']['_terms'] and plugin_type in ['lookup'] %}
+{%   set options_to_skip = options_to_skip + ['_terms'] %}
+{%   set has_positional_parameters = true %}
+
+Terms
+-----
+
+@{   parameters_html([['Terms', doc['options']['_terms']]], suboption_key='suboptions') }@
+
+{% endif %}
+
+{% if doc['options']['_input'] and plugin_type in ['filter', 'test'] %}
+{%   set options_to_skip = options_to_skip + ['_input'] %}
+
+Input
+-----
+
+{%   if plugin_type == 'filter' %}
+This describes the input of the filter, the value before ``| @{plugin_name}@``.
+{%   elif plugin_type == 'test' %}
+This describes the input of the test, the value before ``is @{plugin_name}@`` or ``is not @{plugin_name}@``.
+{%   endif %}
+
+@{   parameters_html([['Input', doc['options']['_input']]], suboption_key='suboptions') }@
+
+{% endif %}
+
+{% if doc['positional'] and plugin_type in ['filter', 'test'] and doc['positional'] != ['_input'] %}
+{%   set has_positional_parameters = true %}
+{%   set options_to_skip = options_to_skip + doc['positional'] %}
+
+Positional parameters
+---------------------
+
+This describes positional parameters of the @{plugin_type}@. These are the values ``positional1``, ``positional2`` and so on in the following
+{%   if plugin_type == 'filter' %}
+example: ``input | @{plugin_name}@(positional1, positional2, ...)``
+{%   elif plugin_type == 'test' %}
+examples: ``input is @{plugin_name}@(positional1, positional2, ...)`` and ``input is not @{plugin_name}@(positional1, positional2, ...)``
+{%   endif %}
+
+@{   parameters_html(doc['options'] | extract_options_from_list(doc['positional'], options_to_ignore=['_input']), suboption_key='suboptions') }@
+
+{% endif %}
+
+{% if doc['options'] | remove_options_from_list(options_to_skip) -%}
+{%   set has_keyword_parameters = true -%}
+
+{%   if plugin_type in ['lookup', 'filter', 'test'] %}
+Keyword parameters
+------------------
+
+This describes keyword parameters of the @{plugin_type}@. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+{%     if plugin_type == 'filter' %}
+example: ``input | @{plugin_name}@(key1=value1, key2=value2, ...)``
+{%     elif plugin_type == 'test' %}
+examples: ``input is @{plugin_name}@(key1=value1, key2=value2, ...)`` and ``input is not @{plugin_name}@(key1=value1, key2=value2, ...)``
+{%     elif plugin_type == 'lookup' %}
+examples: ``lookup('@{plugin_name}@', key1=value1, key2=value2, ...)`` and ``query('@{plugin_name}@', key1=value1, key2=value2, ...)``
+{%     endif %}
+{%   else %}
+Parameters
+----------
+{%   endif %}
+
+@{   parameters_html(doc['options'] | remove_options_from_list(options_to_skip) | dictsort, suboption_key='suboptions') }@
+{% endif %}
+
+{% if doc['attributes'] %}
+
+Attributes
+----------
+
+@{   attributes_rst(doc['attributes']) }@
+{% endif %}
+
+{% if doc['notes'] or (has_positional_parameters and has_keyword_parameters) -%}
+Notes
+-----
+
+{%   if has_positional_parameters and has_keyword_parameters %}
+- When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
+{%     if plugin_type == 'filter' %}
+  ``input | @{plugin_name}@(positional1, positional2, key1=value1, key2=value2)``
+{%     elif plugin_type == 'test' %}
+  ``input is @{plugin_name}@(positional1, positional2, key1=value1, key2=value2)`` and ``input is not @{plugin_name}@(positional1, positional2, key1=value1, key2=value2)``
+{%     elif plugin_type == 'lookup' %}
+  ``lookup('@{plugin_name}@', term1, term2, key1=value1, key2=value2)`` and ``query('@{plugin_name}@', term1, term2, key1=value1, key2=value2)``
+{%     endif %}
+{%   endif %}
+{%   if doc['notes'] %}
+{%     for note in doc['notes'] %}
+- @{ note | rst_ify | indent(width=2) }@
+{%     endfor %}
+{%   endif %}
+{% endif %}
+
+{% if doc['seealso'] -%}
+See Also
+--------
+
+{% for item in doc['seealso'] %}
+{%   if item.module is defined and item.description %}
+* @{ reference_plugin_rst(item['module'], 'module') }@
+
+  @{ item['description'] | rst_ify | indent(2) }@
+{%   elif item.module is defined %}
+* @{ reference_plugin_rst(item['module'], 'module') }@
+
+  The official documentation on the **@{ item['module'] }@** module.
+{%   elif item.plugin is defined and item.plugin_type is defined and item.description %}
+* @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
+
+  @{ item['description'] | rst_ify | indent(2) }@
+{%   elif item.plugin is defined and item.plugin_type is defined %}
+* @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
+
+  The official documentation on the **@{ item['plugin'] }@** @{ item['plugin_type'] }@ plugin.
+{%   elif item.name is defined and item.link is defined and item.description %}
+* `@{ item['name'] }@ <@{ item['link'] }@>`_
+
+  @{ item['description'] | rst_ify | indent(2) }@
+{%   elif item.ref is defined and item.description %}
+* :ref:`@{ item['ref'] }@`
+
+  @{ item['description'] | rst_ify | indent(2) }@
+{%   endif %}
+{% endfor %}
+{% endif %}
+
+{% if examples -%}
+Examples
+--------
+
+.. code-block:: yaml
+
+@{ examples | indent(4, True) }@
+
+{% endif %}
+
+{% if 'ansible_facts' in returndocs and plugin_type == 'module' %}
+{%   set returnfacts = returndocs['ansible_facts']['contains'] %}
+{%   set _x = returndocs.pop('ansible_facts', None) %}
+{% endif %}
+
+{% if returnfacts -%}
+Returned Facts
+--------------
+Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
+
+@{   return_docs_html(returnfacts | dictsort) }@
+{% endif %}
+
+{% if returndocs -%}
+{%   if plugin_type not in ['lookup', 'filter', 'test'] %}
+{#     This only makes sense for plugins which can return more than one value. #}
+Return Values
+-------------
+The following are the fields unique to this @{ plugin_type }@:
+{%   else %}
+Return Value
+------------
+{%   endif %}
+
+{%   if plugin_type in ['lookup', 'filter', 'test'] and returndocs | length == 1 and (returndocs | first).startswith('_') %}
+@{     return_docs_html([['Return value', returndocs.values() | first]]) }@
+{%   else %}
+@{     return_docs_html(returndocs | dictsort) }@
+{%   endif %}
+{% endif %}
+
+{% if doc['deprecated'] %}
+Status
+------
+
+{% if doc['deprecated']['removed_from_collection'] and doc['deprecated']['removed_from_collection'] != collection %}
+{%   if doc['deprecated']['removed_at_date'] %}
+- This @{ plugin_type }@ will be removed in a major release after @{ doc['deprecated']['removed_at_date'] | rst_ify }@
+  of @{ doc['deprecated']['removed_from_collection'] | rst_ify }@.
+{%   elif doc['deprecated']['removed_in'] %}
+- This @{ plugin_type }@ will be removed in version @{ doc['deprecated']['removed_in'] | string | rst_ify }@
+  of @{ doc['deprecated']['removed_from_collection'] | rst_ify }@.
+{%   else %}
+- This @{ plugin_type }@ will be removed in a future release of @{ doc['deprecated']['removed_from_collection'] | rst_ify }@.
+{%   endif %}
+{% else %}
+{%   if doc['deprecated']['removed_at_date'] %}
+- This @{ plugin_type }@ will be removed in a major release after @{ doc['deprecated']['removed_at_date'] | rst_ify }@.
+{%   elif doc['deprecated']['removed_in'] %}
+- This @{ plugin_type }@ will be removed in version @{ doc['deprecated']['removed_in'] | string | rst_ify }@.
+{%   else %}
+- This @{ plugin_type }@ will be removed in a future release.
+{%   endif %}
+{% endif %}
+  *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+{% endif %}
+
+{% if doc['author'] -%}
+Authors
+~~~~~~~
+
+{%   for author_name in doc['author'] %}
+- @{ author_name | massage_author_name }@
+{%   endfor %}
+
+{% endif %}
+
+{% if plugin_type != 'module' %}
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+{% endif %}
+
+{% if collection_links %}
+Collection links
+~~~~~~~~~~~~~~~~
+
+{%   for link in collection_links %}
+* `@{ link.description | rst_escape }@ <@{ link.url | rst_escape }@>`__
+{%   endfor %}
+{% endif %}
+
+{% if nonfatal_errors %}
+There were some errors parsing the documentation for this plugin.  Please file a bug with the `@{ collection }@ collection <@{ collection_issue_tracker or (collection | collection_url) }@>`_.
+
+The errors were:
+
+{%   for error in nonfatal_errors %}
+* ::
+
+@{     error | indent(width=8, first=True) }@
+
+{%   endfor %}
+{% endif %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/plugins_by_collection.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/plugins_by_collection.rst.j2
new file mode 100644
index 00000000..cc40fde7
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/plugins_by_collection.rst.j2
@@ -0,0 +1,127 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% macro list_plugins(plugin_type) %}
+{%   for name, desc in plugin_maps[plugin_type].items() | sort %}
+* `@{ name }@ @{ plugin_type }@ <@{ get_plugin_filename(collection_name ~ '.' ~ name, plugin_type) }@>`_ -- @{ desc | rst_ify(plugin_fqcn=collection_name ~ '.' ~ name, plugin_type=plugin_type) | indent(width=2) }@
+{%   endfor %}
+{% endmacro %}
+
+@{collection_name.title()}@
+@{ '=' * (collection_name | length) }@
+
+{% if collection_version %}
+Collection version @{ collection_version }@
+{% endif %}
+
+.. contents::
+   :local:
+   :depth: 1
+
+{% if collection_description or collection_authors or collection_links or requires_ansible %}
+Description
+-----------
+
+{%   if collection_description %}
+@{ link_data.description | rst_ify }@
+{%   endif %}
+
+{%   if collection_authors %}
+**Author@{ 's' if (collection_authors | length) > 1 else '' }@:**
+
+{%     for author in collection_authors %}
+* @{ author | indent(2) }@
+{%     endfor %}
+{%   endif %}
+
+{%   if requires_ansible %}
+**Supported ansible-core versions:**
+
+{%     for part in requires_ansible %}
+* @{     part | rst_escape }@
+{%     endfor %}
+{%   endif %}
+
+{%   if collection_links %}
+Collection links
+~~~~~~~~~~~~~~~~
+
+{%     for link in collection_links %}
+* `@{ link.description | rst_escape }@ <@{ link.url | rst_escape }@>`__
+{%     endfor %}
+{%   endif %}
+
+{% endif %}
+
+{% if not collection_communication.empty %}
+Communication
+-------------
+
+{%   for matrix_room in collection_communication.matrix_rooms %}
+- Matrix room :literal:`@{ matrix_room.room | rst_escape(escape_ending_whitespace=true) }@`: `@{ matrix_room.topic | rst_escape }@ <https://matrix.to/#/@{ matrix_room.room | rst_escape }@>`__.
+{%   endfor %}
+{%   for irc_channel in collection_communication.irc_channels %}
+- IRC channel :literal:`@{ irc_channel.channel | rst_escape(escape_ending_whitespace=true) }@` (@{ irc_channel.network | rst_escape }@ network):
+{%     if irc_channel.network == 'Libera' %}
+  `@{ irc_channel.topic }@ <https://web.libera.chat/?channel=@{ irc_channel.channel | rst_escape }@>`__.
+{%     else %}
+  @{ irc_channel.topic | rst_escape }@.
+{%     endif %}
+{%   endfor %}
+{%   for mailing_list in collection_communication.mailing_lists %}
+- Mailing list: `@{ mailing_list.topic | rst_escape }@ <@{ mailing_list.url | rst_escape }@>`__.
+{%     if mailing_list.subscribe %}
+  (`Subscribe <mailto:@{ mailing_list.subscribe | rst_escape }@>`__)
+{%     endif %}
+{%   endfor %}
+{% endif %}
+
+{% for section in extra_docs_sections %}
+@{section.title}@
+@{ '-' * (section.title | length) }@
+
+{%   if section.toctree %}
+{%     for toctree_entry in section.toctree %}
+{%       if toctree_entry.title %}
+* `@{ toctree_entry.title | rst_escape }@ <@{ toctree_entry.ref }@.rst>`_
+{%       else %}
+* `<@{ toctree_entry.ref }@.rst>`_
+{%       endif %}
+{%     endfor %}
+{%   endif %}
+
+{% endfor %}
+
+Plugin Index
+------------
+
+{% if plugin_maps | reject('eq', 'role') | list %}
+These are the plugins in the @{collection_name}@ collection:
+{% else %}
+There are no plugins in the @{collection_name}@ collection with automatically generated documentation.
+{% endif %}
+
+{% for category in plugin_maps | reject('eq', 'role') | sort | move_first('module') %}
+
+{%   if category == 'module' %}
+Modules
+~~~~~~~
+{%   else %}
+@{ category | capitalize }@ Plugins
+@{ '~' * ((category | length) + 8) }@
+{%   endif %}
+
+@{   list_plugins(category) }@
+{% endfor %}
+
+{% if 'role' in plugin_maps %}
+Role Index
+----------
+
+These are the roles in the @{collection_name}@ collection:
+
+@{   list_plugins('role') }@
+{% endif %}
diff --git a/src/antsibull_docs/data/docsite/simplified-rst/role.rst.j2 b/src/antsibull_docs/data/docsite/simplified-rst/role.rst.j2
new file mode 100644
index 00000000..620ce4af
--- /dev/null
+++ b/src/antsibull_docs/data/docsite/simplified-rst/role.rst.j2
@@ -0,0 +1,180 @@
+{#
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+#}
+
+{% from 'macros/attributes.rst.j2' import in_rst as attributes_rst with context %}
+{% from 'macros/parameters.rst.j2' import in_html as parameters_html with context %}
+{% from 'macros/version_added.rst.j2' import version_added_rst %}
+
+{% if entry_points.main and entry_points.main.short_description -%}
+{%   set title = plugin_name ~ ' ' ~ plugin_type ~ ' -- ' ~ entry_points.main.short_description | rst_ify(role_entrypoint='main') -%}
+{% else -%}
+{%   set title = plugin_name ~ ' ' ~ plugin_type -%}
+{% endif -%}
+
+@{ title }@
+@{ '+' * title|length }@
+
+{% if collection == 'ansible.builtin' -%}
+This role is part of ``ansible-core`` and included in all Ansible
+installations.
+{% else %}
+This role is part of the `@{collection}@ collection <@{ collection | collection_url }@>`_{% if collection_version %} (version @{ collection_version }@){% endif %}.
+{%   if for_official_docsite %}
+
+You might already have this collection installed if you are using the ``ansible`` package.
+It is not included in ``ansible-core``.
+To check whether it is installed, run :code:`ansible-galaxy collection list`.
+{%   endif %}
+
+To install it use: @{ collection | collection_install | rst_code }@.
+
+To use it in a playbook, specify: :code:`@{plugin_name}@`.
+{% endif %}
+
+.. contents::
+   :local:
+   :depth: 2
+
+{% for entry_point, ep_doc in entry_points.items() | sort %}
+
+{%   if ep_doc['short_description'] -%}
+{%     set title = 'Entry point ``' + entry_point + '`` -- ' + ep_doc['short_description'] | rst_ify(role_entrypoint=entry_point) -%}
+{%   else -%}
+{%     set title = 'Entry point ``' + entry_point + '``' -%}
+{%   endif -%}
+
+@{ title }@
+@{ '-' * title|length }@
+
+{%   if ep_doc['version_added'] is still_relevant(collection=collection) -%}
+New in @{ version_added_rst(ep_doc['version_added'], collection) }@
+{%   endif %}
+
+{%   if ep_doc['deprecated'] -%}
+DEPRECATED
+^^^^^^^^^^
+{%     if ep_doc['deprecated']['removed_at_date'] %}
+:Removed in: major release after @{ ep_doc['deprecated']['removed_at_date'] | rst_ify(role_entrypoint=entry_point) }@
+{%     elif ep_doc['deprecated']['removed_in'] %}
+:Removed in: version @{ ep_doc['deprecated']['removed_in'] | rst_ify(role_entrypoint=entry_point) }@
+{%     else %}
+:Removed in: a future release
+{%     endif %}
+:Why: @{ ep_doc['deprecated']['why'] | rst_ify(role_entrypoint=entry_point) | indent(6) }@
+:Alternative: @{ ep_doc['deprecated']['alternative'] | rst_ify(role_entrypoint=entry_point) | indent(14) }@
+{%   endif %}
+
+Synopsis
+^^^^^^^^
+
+{%   for desc in ep_doc['description'] -%}
+- @{ desc | rst_ify(role_entrypoint=entry_point) | indent(width=2) }@
+{%   endfor %}
+
+{%   if ep_doc['requirements'] -%}
+Requirements
+^^^^^^^^^^^^
+The below requirements are needed on the remote host and/or the local controller node.
+
+{%     for req in ep_doc['requirements'] %}
+- @{ req | rst_ify(role_entrypoint=entry_point) | indent(width=2) }@
+{%     endfor %}
+
+{%   endif %}
+
+{%   if ep_doc['options'] -%}
+
+Parameters
+^^^^^^^^^^
+
+@{     parameters_html(ep_doc['options'] | dictsort, suboption_key='options', parameter_html_prefix=entry_point ~ '--', parameter_rst_prefix=entry_point ~ '__', role_entrypoint=entry_point) }@
+{%   endif %}
+
+{%   if ep_doc['attributes'] %}
+
+Attributes
+----------
+
+@{     attributes_rst(ep_doc['attributes'], role_entrypoint=entry_point) }@
+{%   endif %}
+
+{%   if ep_doc['notes'] -%}
+Notes
+^^^^^
+
+{%     for note in ep_doc['notes'] %}
+- @{ note | rst_ify(role_entrypoint=entry_point) | indent(width=2) }@
+{%     endfor %}
+{%   endif %}
+
+{%   if ep_doc['seealso'] -%}
+See Also
+^^^^^^^^
+
+{%     for item in ep_doc['seealso'] %}
+{%       if item.module is defined and item.description %}
+* @{ reference_plugin_rst(item['module'], 'module') }@
+
+  @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(2) }@
+{%       elif item.module is defined %}
+* @{ reference_plugin_rst(item['module'], 'module') }@
+
+  The official documentation on the **@{ item['module'] }@** module.
+{%       elif item.plugin is defined and item.plugin_type is defined and item.description %}
+* @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
+
+  @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(2) }@
+{%       elif item.plugin is defined and item.plugin_type is defined %}
+* @{ reference_plugin_rst(item['plugin'], item['plugin_type']) }@ @{ item['plugin_type'] }@ plugin
+
+  The official documentation on the **@{ item['plugin'] }@** @{ item['plugin_type'] }@ plugin.
+{%       elif item.name is defined and item.link is defined and item.description %}
+* `@{ item['name'] }@ <@{ item['link'] }@>`_
+
+   @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(2) }@
+{%       elif item.ref is defined and item.description %}
+* :ref:`@{ item['ref'] }@`
+
+  @{ item['description'] | rst_ify(role_entrypoint=entry_point) | indent(2) }@
+{%       endif %}
+{%     endfor %}
+{%   endif %}
+
+{%   if ep_doc['author'] -%}
+Authors
+^^^^^^^
+
+{%     for author_name in ep_doc['author'] %}
+- @{ author_name | massage_author_name }@
+{%     endfor %}
+
+{%   endif %}
+
+{% endfor %}
+
+.. Extra links
+
+{% if collection_links %}
+Collection links
+~~~~~~~~~~~~~~~~
+
+{%   for link in collection_links %}
+* `@{ link.description | rst_escape }@ <@{ link.url | rst_escape }@>`__
+{%   endfor %}
+{% endif %}
+
+{% if nonfatal_errors %}
+There were some errors parsing the documentation for this role.  Please file a bug with the `@{ collection }@ collection <@{ collection_issue_tracker or (collection | collection_url) }@>`_.
+
+The errors were:
+
+{% for error in nonfatal_errors %}
+* ::
+
+@{ error | indent(width=8, first=True) }@
+
+{% endfor %}
+{% endif %}
diff --git a/src/antsibull_docs/data/sphinx_init/build_sh.j2 b/src/antsibull_docs/data/sphinx_init/build_sh.j2
index e00f5e00..58991380 100644
--- a/src/antsibull_docs/data/sphinx_init/build_sh.j2
+++ b/src/antsibull_docs/data/sphinx_init/build_sh.j2
@@ -44,6 +44,7 @@ antsibull-docs \
 {%     if squash_hierarchy %}
     --squash-hierarchy \
 {%     endif %}
+    --output-format @{ output_format }@ \
     --dest-dir temp-rst \
     @{ ' '.join(collections) }@
 {% endif %}
diff --git a/src/antsibull_docs/jinja2/__init__.py b/src/antsibull_docs/jinja2/__init__.py
index ec1a6ff7..0b237418 100644
--- a/src/antsibull_docs/jinja2/__init__.py
+++ b/src/antsibull_docs/jinja2/__init__.py
@@ -11,26 +11,64 @@
 from enum import Enum
 
 
-class OutputFormatObj:
-    def __init__(self, value: str, extension: str):
-        self._value_ = value
-        self._value = value
-        self._extension = extension
+class OutputFormat(Enum):
+    def __init__(
+        self, output_format: str, template_extension: str, output_extension: str
+    ):
+        self._output_format = output_format
+        self._template_extension = template_extension
+        self._output_extension = output_extension
+
+    ANSIBLE_DOCSITE = ("ansible-docsite", ".rst.j2", ".rst")
+    SIMPLIFIED_RST = ("simplified-rst", ".rst.j2", ".rst")
+
+    @property
+    def output_format(self):
+        return self._output_format
 
     @property
-    def value(self):
-        return self._value
+    def template_extension(self):
+        return self._template_extension
 
     @property
-    def extension(self):
-        return self._extension
+    def output_extension(self):
+        return self._output_extension
+
+    @classmethod
+    def parse(cls, output_format: str) -> OutputFormat:
+        for elt in cls:
+            if elt.output_format == output_format:
+                return elt
+        output_formats = ", ".join(sorted(f"'{elt.output_format}'" for elt in cls))
+        raise ValueError(
+            f"Unknown output format '{output_format}'. Allowed values are {output_formats}"
+        )
 
-    def __str__(self):
-        return self._value
 
+class FilenameGenerator:
+    def __init__(self, *, include_collection_name_in_plugins: bool = False):
+        """
+        :kwarg include_collection_name_in_plugins: Default False.  Set to True to use the FQCN
+            for plugin files instead of only the part without the collection name.
+        """
+        self._include_collection_name_in_plugins = include_collection_name_in_plugins
 
-class OutputFormat(OutputFormatObj, Enum):
-    def __new__(cls, value: str, extension: str):
-        return OutputFormatObj(value, extension)
+    def plugin_basename(self, plugin_fqcn: str, plugin_type: str) -> str:
+        """
+        Given the plugin's FQCN and type, return the basename for the plugin's documentation's
+        filename.
+        """
+        col_namespace, col_name, plugin_name = plugin_fqcn.split(".", 2)
+        prefix = ""
+        if self._include_collection_name_in_plugins:
+            prefix = f"{col_namespace}.{col_name}."
+        return f"{prefix}{plugin_name}_{plugin_type}"
 
-    ANSIBLE_DOCSITE = ("ansible-docsite", ".rst.j2")
+    def plugin_filename(
+        self, plugin_fqcn: str, plugin_type: str, output_format: OutputFormat
+    ) -> str:
+        """
+        Given the plugin's FQCN and type, return the plugin's documentation's filename.
+        """
+        basename = self.plugin_basename(plugin_fqcn, plugin_type)
+        return f"{basename}{output_format.output_extension}"
diff --git a/src/antsibull_docs/jinja2/environment.py b/src/antsibull_docs/jinja2/environment.py
index ff46d7e7..1ed907e9 100644
--- a/src/antsibull_docs/jinja2/environment.py
+++ b/src/antsibull_docs/jinja2/environment.py
@@ -6,7 +6,6 @@
 
 from __future__ import annotations
 
-import json
 import os.path
 import typing as t
 from collections.abc import Mapping
@@ -15,57 +14,56 @@
 
 from ..markup.rstify import rst_code, rst_escape
 from ..utils.collection_name_transformer import CollectionNameTransformer
-from . import OutputFormat
+from . import FilenameGenerator, OutputFormat
 from .filters import (
-    do_max,
+    collection_name,
     documented_type,
     extract_options_from_list,
     html_ify,
     make_rst_ify,
     massage_author_name,
     move_first,
+    plugin_shortname,
     remove_options_from_list,
     rst_fmt,
     rst_xline,
+    suboption_depth,
     to_ini_value,
     to_json,
 )
 from .tests import still_relevant, test_list
 
-# kludge_ns gives us a kludgey way to set variables inside of loops that need to be visible outside
-# the loop.  We can get rid of this when we no longer need to build docs with less than Jinja-2.10
-# http://jinja.pocoo.org/docs/2.10/templates/#assignments
-# With Jinja-2.10 we can use jinja2's namespace feature, restoring the namespace template portion
-# of: fa5c0282a4816c4dd48e80b983ffc1e14506a1f5
-NS_MAP = {}
 
+def reference_plugin_rst(plugin_name: str, plugin_type: str) -> str:
+    fqcn = f"{plugin_name}"
+    return f"\\ :ref:`{rst_escape(fqcn)} <ansible_collections.{fqcn}_{plugin_type}>`\\ "
 
-def to_kludge_ns(key, value):
-    NS_MAP[key] = value
-    return ""
 
+def reference_plugin_rst_simplified(plugin_name: str, plugin_type: str) -> str:
+    fqcn = f"{plugin_name}"
+    # TODO: return f"\\ {fqcn}\\ " for other collections
+    name = plugin_name.split(".", 2)[2]
+    return f"\\ `{rst_escape(fqcn)} <{name}_{plugin_type}.rst>`__\\ "
 
-def from_kludge_ns(key):
-    return NS_MAP[key]
 
-
-def reference_plugin_rst(plugin_name: str, plugin_type: str) -> str:
-    fqcn = f"{plugin_name}"
-    return f"\\ :ref:`{rst_escape(fqcn)} <ansible_collections.{fqcn}_{plugin_type}>`\\ "
+def make_reference_plugin_rst(output_format: OutputFormat):
+    if output_format == OutputFormat.SIMPLIFIED_RST:
+        return reference_plugin_rst_simplified
+    return reference_plugin_rst
 
 
 def get_template_location(output_format: OutputFormat) -> tuple[str, str]:
     """
     Return template location given the output format.
     """
-    return ("antsibull_docs.data", f"docsite/{output_format.value}")
+    return ("antsibull_docs.data", f"docsite/{output_format.output_format}")
 
 
 def get_template_filename(filename_base: str, output_format: OutputFormat) -> str:
     """
     Return template filename given the filename base and the output format.
     """
-    return f"{filename_base}{output_format.extension}"
+    return f"{filename_base}{output_format.template_extension}"
 
 
 def _get_loader(
@@ -91,6 +89,24 @@ def _get_loader(
     return PackageLoader(template_pkg, template_path)
 
 
+def _create_filename_functions(
+    filename_generator: FilenameGenerator,
+    output_format: OutputFormat,
+) -> Mapping[str, t.Callable]:
+    def get_plugin_basename(plugin_fqcn: str, plugin_type: str) -> str:
+        return filename_generator.plugin_basename(plugin_fqcn, plugin_type)
+
+    def get_plugin_filename(plugin_fqcn: str, plugin_type: str) -> str:
+        return filename_generator.plugin_filename(
+            plugin_fqcn, plugin_type, output_format
+        )
+
+    return {
+        "get_plugin_basename": get_plugin_basename,
+        "get_plugin_filename": get_plugin_filename,
+    }
+
+
 def doc_environment(
     template_location: str | tuple[str, str] | None = None,
     *,
@@ -100,6 +116,7 @@ def doc_environment(
     collection_install: CollectionNameTransformer | None = None,
     referable_envvars: set[str] | None = None,
     output_format: OutputFormat | None = None,
+    filename_generator: FilenameGenerator | None = None,
 ) -> Environment:
     loader = _get_loader(template_location, output_format)
     if output_format is None:
@@ -113,19 +130,12 @@ def doc_environment(
     )
     env.globals["xline"] = rst_xline
 
-    # Can be removed (and template switched to use namespace) when we no longer need to build
-    # with <Jinja-2.10
-    env.globals["to_kludge_ns"] = to_kludge_ns
-    env.globals["from_kludge_ns"] = from_kludge_ns
-    if "max" not in env.filters:
-        # Jinja < 2.10
-        env.filters["max"] = do_max
-
-    if "tojson" not in env.filters:
-        # Jinja < 2.9
-        env.filters["tojson"] = json.dumps
+    if filename_generator:
+        env.globals.update(
+            _create_filename_functions(filename_generator, output_format)
+        )
 
-    env.globals["reference_plugin_rst"] = reference_plugin_rst
+    env.globals["reference_plugin_rst"] = make_reference_plugin_rst(output_format)
     env.globals["referable_envvars"] = referable_envvars
     env.filters["rst_ify"] = make_rst_ify(output_format)
     env.filters["html_ify"] = html_ify
@@ -140,6 +150,9 @@ def doc_environment(
     env.filters["remove_options_from_list"] = remove_options_from_list
     env.filters["antsibull_to_json"] = to_json
     env.filters["antsibull_to_ini_value"] = to_ini_value
+    env.filters["collection_name"] = collection_name
+    env.filters["plugin_shortname"] = plugin_shortname
+    env.filters["suboption_depth"] = suboption_depth
     if collection_url is not None:
         env.filters["collection_url"] = collection_url
     if collection_install is not None:
diff --git a/src/antsibull_docs/jinja2/filters.py b/src/antsibull_docs/jinja2/filters.py
index 06a67136..b82685d8 100644
--- a/src/antsibull_docs/jinja2/filters.py
+++ b/src/antsibull_docs/jinja2/filters.py
@@ -18,7 +18,7 @@
 from jinja2.utils import pass_context
 
 from ..markup.htmlify import html_ify as html_ify_impl
-from ..markup.rstify import get_rst_formatter
+from ..markup.rstify import get_rst_formatter_link_provider
 from ..markup.rstify import rst_ify as rst_ify_impl
 from . import OutputFormat
 
@@ -31,15 +31,21 @@
 
 def extract_plugin_data(
     context: Context, plugin_fqcn: str | None = None, plugin_type: str | None = None
-) -> tuple[str | None, str | None]:
-    plugin_fqcn = context.get("plugin_name") if plugin_fqcn is None else plugin_fqcn
-    plugin_type = context.get("plugin_type") if plugin_type is None else plugin_type
+) -> tuple[str | None, str | None, str | None, str | None]:
+    # The doc plugin is determined by the current page
+    doc_plugin_fqcn = context.get("plugin_name")
+    doc_plugin_type = context.get("plugin_type")
+    if doc_plugin_fqcn is None or doc_plugin_type is None:
+        doc_plugin_fqcn = doc_plugin_type = None
+
+    # The current plugin for this markup is determined by the parameters,
+    # with fallback to the doc plugin
+    plugin_fqcn = doc_plugin_fqcn if plugin_fqcn is None else plugin_fqcn
+    plugin_type = doc_plugin_type if plugin_type is None else plugin_type
     if plugin_fqcn is None or plugin_type is None:
-        return None, None
-    # if plugin_type == 'role':
-    #     entry_point = context.get('entry_point', 'main')
-    #     # FIXME: use entry_point
-    return plugin_fqcn, plugin_type
+        plugin_fqcn = plugin_type = None
+
+    return doc_plugin_fqcn, doc_plugin_type, plugin_fqcn, plugin_type
 
 
 def documented_type(text) -> str:
@@ -58,11 +64,6 @@ def documented_type(text) -> str:
     return text
 
 
-# The max filter was added in Jinja2-2.10.  Until we can require that version, use this
-def do_max(seq):
-    return max(seq)
-
-
 def rst_fmt(text, fmt):
     """helper for Jinja2 to do format strings"""
 
@@ -155,17 +156,29 @@ def rst_ify(
         flog = mlog.fields(func="rst_ify")
         flog.fields(text=text).debug("Enter")
 
-        plugin_fqcn, plugin_type = extract_plugin_data(
-            context, plugin_fqcn=plugin_fqcn, plugin_type=plugin_type
+        (
+            doc_plugin_fqcn,
+            doc_plugin_type,
+            plugin_fqcn,
+            plugin_type,
+        ) = extract_plugin_data(
+            context,
+            plugin_fqcn=plugin_fqcn,
+            plugin_type=plugin_type,
         )
 
-        formatter = get_rst_formatter(output_format, context.get("referable_envvars"))
+        formatter, link_provider = get_rst_formatter_link_provider(
+            output_format, context.get("referable_envvars")
+        )
         text, counts = rst_ify_impl(
             text,
             plugin_fqcn=plugin_fqcn,
             plugin_type=plugin_type,
             role_entrypoint=role_entrypoint,
+            doc_plugin_fqcn=doc_plugin_fqcn,
+            doc_plugin_type=doc_plugin_type,
             formatter=formatter,
+            link_provider=link_provider,
         )
 
         flog.fields(counts=counts).info("Number of macros converted to rst equivalents")
@@ -188,8 +201,10 @@ def html_ify(
     flog = mlog.fields(func="html_ify")
     flog.fields(text=text).debug("Enter")
 
-    plugin_fqcn, plugin_type = extract_plugin_data(
-        context, plugin_fqcn=plugin_fqcn, plugin_type=plugin_type
+    doc_plugin_fqcn, doc_plugin_type, plugin_fqcn, plugin_type = extract_plugin_data(
+        context,
+        plugin_fqcn=plugin_fqcn,
+        plugin_type=plugin_type,
     )
 
     text, counts = html_ify_impl(
@@ -197,8 +212,29 @@ def html_ify(
         plugin_fqcn=plugin_fqcn,
         plugin_type=plugin_type,
         role_entrypoint=role_entrypoint,
+        doc_plugin_fqcn=doc_plugin_fqcn,
+        doc_plugin_type=doc_plugin_type,
     )
 
     flog.fields(counts=counts).info("Number of macros converted to html equivalents")
     flog.debug("Leave")
     return text
+
+
+def collection_name(fqcn: str) -> str:
+    return ".".join(fqcn.split(".", 2)[:2])
+
+
+def plugin_shortname(fqcn: str) -> str:
+    return fqcn.split(".", 2)[2]
+
+
+def suboption_depth(
+    data: Sequence[tuple[t.Any, t.Any]] | t.ItemsView[t.Any, t.Any], subkey: str
+) -> int:
+    subdepth = 0
+    for _, option in data:
+        subdata = option.get(subkey)
+        if subdata and isinstance(subdata, Mapping):
+            subdepth = max(subdepth, suboption_depth(subdata.items(), subkey))
+    return subdepth + 1
diff --git a/src/antsibull_docs/lint_plugin_docs.py b/src/antsibull_docs/lint_plugin_docs.py
index 0d049b7e..be55f882 100644
--- a/src/antsibull_docs/lint_plugin_docs.py
+++ b/src/antsibull_docs/lint_plugin_docs.py
@@ -782,6 +782,7 @@ def lint_collection_plugin_docs(
     disallow_unknown_collection_refs: bool = False,
     skip_rstcheck: bool = False,
     disallow_semantic_markup: bool = False,
+    output_format: OutputFormat = OutputFormat.ANSIBLE_DOCSITE,
 ) -> list[tuple[str, int, int, str]]:
     try:
         info = load_collection_info(path_to_collection)
@@ -842,7 +843,7 @@ def lint_collection_plugin_docs(
                 disallow_unknown_collection_refs=disallow_unknown_collection_refs,
                 skip_rstcheck=skip_rstcheck,
                 disallow_semantic_markup=disallow_semantic_markup,
-                output_format=OutputFormat.ANSIBLE_DOCSITE,
+                output_format=output_format,
             )
         )
     return result
diff --git a/src/antsibull_docs/markup/htmlify.py b/src/antsibull_docs/markup/htmlify.py
index 7782cc5a..c17a2f28 100644
--- a/src/antsibull_docs/markup/htmlify.py
+++ b/src/antsibull_docs/markup/htmlify.py
@@ -47,18 +47,25 @@ def html_ify(
     plugin_fqcn: str | None = None,
     plugin_type: str | None = None,
     role_entrypoint: str | None = None,
+    doc_plugin_fqcn: str | None = None,
+    doc_plugin_type: str | None = None,
 ) -> tuple[str, Mapping[str, int]]:
     """convert symbols like I(this is in italics) to valid HTML"""
     current_plugin: dom.PluginIdentifier | None = None
     if plugin_fqcn and plugin_type:
         current_plugin = dom.PluginIdentifier(fqcn=plugin_fqcn, type=plugin_type)
+    doc_current_plugin: dom.PluginIdentifier | None = None
+    if doc_plugin_fqcn and doc_plugin_type:
+        doc_current_plugin = dom.PluginIdentifier(
+            fqcn=doc_plugin_fqcn, type=doc_plugin_type
+        )
     context = Context(current_plugin=current_plugin, role_entrypoint=role_entrypoint)
     paragraphs = parse(text, context, errors="message")
     link_provider = _HTMLLinkProvider()
     text = to_html(
         paragraphs,
         link_provider=link_provider,
-        current_plugin=current_plugin,
+        current_plugin=doc_current_plugin,
         par_start="",
         par_end="",
     )
diff --git a/src/antsibull_docs/markup/rstify.py b/src/antsibull_docs/markup/rstify.py
index 5e655618..5f29077f 100644
--- a/src/antsibull_docs/markup/rstify.py
+++ b/src/antsibull_docs/markup/rstify.py
@@ -12,13 +12,15 @@
 from collections.abc import Mapping
 
 from antsibull_docs_parser import dom
-from antsibull_docs_parser.format import Formatter
+from antsibull_docs_parser.format import Formatter, LinkProvider
 from antsibull_docs_parser.parser import Context, parse
 from antsibull_docs_parser.rst import AntsibullRSTFormatter as _AntsibullRSTFormatter
+from antsibull_docs_parser.rst import PlainRSTFormatter as _PlainRSTFormatter
 from antsibull_docs_parser.rst import rst_escape as _rst_escape
 from antsibull_docs_parser.rst import to_rst
 
 from ..jinja2 import OutputFormat
+from ..utils.rst import massage_rst_label
 from ._counter import count as _count
 
 
@@ -48,6 +50,86 @@ def format_env_variable(self, part: dom.EnvVariablePart) -> str:
         return f"\\ :ansenvvar:`{_rst_escape(part.name, True)}`\\ "
 
 
+class SimplifiedRSTLinkProvider(LinkProvider):
+    def plugin_link(
+        self,
+        plugin: dom.PluginIdentifier,
+    ) -> t.Optional[str]:
+        # TODO: return None for other collections
+        name = plugin.fqcn.split(".", 2)[2]
+        return f"{name}_{plugin.type}.rst"
+
+    def plugin_option_like_link(
+        self,
+        plugin: dom.PluginIdentifier,
+        entrypoint: t.Optional[str],
+        what: t.Literal["option", "retval"],
+        name: t.List[str],
+        current_plugin: bool,
+    ) -> t.Optional[str]:
+        if current_plugin:
+            ref = massage_rst_label("/".join(name))
+            ep = f"{entrypoint}__" if entrypoint is not None else ""
+            prefix = "return" if what == "retval" else "parameter"
+            return f"{prefix}-{ep}{ref}_"
+        return self.plugin_link(plugin)
+
+
+class SimplifiedRSTFormatter(_PlainRSTFormatter):
+    @staticmethod
+    def _custom_format_option_like(
+        part: t.Union[dom.OptionNamePart, dom.ReturnValuePart],
+        url: t.Optional[str],
+    ) -> str:
+        plugin = part.plugin
+        if url and url.endswith("_"):
+            plugin_text = f" (`link <{url}>`_)"
+        elif plugin:
+            plugin_result = [plugin.type]
+            if plugin.type not in ("module", "role", "playbook"):
+                plugin_result.append(" plugin")
+            plugin_result.append(" ")
+            if url:
+                plugin_result.append(f"`{rst_escape(plugin.fqcn)} <{url}>`__")
+            else:
+                plugin_result.append(rst_escape(plugin.fqcn))
+            entrypoint = part.entrypoint
+            if entrypoint is not None:
+                if plugin_result:
+                    plugin_result.append(", ")
+                plugin_result.append("entrypoint ")
+                plugin_result.append(rst_escape(entrypoint, True))
+            plugin_text = f" (of {''.join(plugin_result)})"
+        else:
+            plugin_text = ""
+        value_text = part.name
+        value = part.value
+        if value is not None:
+            value_text = f"{value_text}={value}"
+        return f"\\ :literal:`{rst_escape(value_text, True)}`{plugin_text}\\ "
+
+    def format_option_name(self, part: dom.OptionNamePart, url: t.Optional[str]) -> str:
+        return self._custom_format_option_like(part, url)
+
+    def format_return_value(
+        self, part: dom.ReturnValuePart, url: t.Optional[str]
+    ) -> str:
+        return self._custom_format_option_like(part, url)
+
+    def format_env_variable(self, part: dom.EnvVariablePart) -> str:
+        return f"\\ :literal:`{rst_escape(part.name, True)}`\\ "
+
+    def format_module(self, part: dom.ModulePart, url: t.Optional[str]) -> str:
+        if url:
+            return f"\\ `{rst_escape(part.fqcn)} <{url}>`__\\ "
+        return f"\\ {rst_escape(part.fqcn)}\\ "
+
+    def format_plugin(self, part: dom.PluginPart, url: t.Optional[str]) -> str:
+        if url:
+            return f"\\ `{rst_escape(part.plugin.fqcn)} <{url}>`__\\ "
+        return f"\\ {rst_escape(part.plugin.fqcn)} \\ "
+
+
 def rst_ify(
     text: str,
     formatter: Formatter,
@@ -55,26 +137,37 @@ def rst_ify(
     plugin_fqcn: str | None = None,
     plugin_type: str | None = None,
     role_entrypoint: str | None = None,
+    doc_plugin_fqcn: str | None = None,
+    doc_plugin_type: str | None = None,
+    link_provider: LinkProvider | None = None,
 ) -> tuple[str, Mapping[str, int]]:
     """convert symbols like I(this is in italics) to valid restructured text"""
     current_plugin: dom.PluginIdentifier | None = None
     if plugin_fqcn and plugin_type:
         current_plugin = dom.PluginIdentifier(fqcn=plugin_fqcn, type=plugin_type)
+    doc_current_plugin: dom.PluginIdentifier | None = None
+    if doc_plugin_fqcn and doc_plugin_type:
+        doc_current_plugin = dom.PluginIdentifier(
+            fqcn=doc_plugin_fqcn, type=doc_plugin_type
+        )
     context = Context(current_plugin=current_plugin, role_entrypoint=role_entrypoint)
     paragraphs = parse(text, context, errors="message")
     text = to_rst(
         paragraphs,
-        current_plugin=current_plugin,
+        current_plugin=doc_current_plugin,
         formatter=formatter,
+        link_provider=link_provider,
     )
     counts = _count(paragraphs)
     return text, counts
 
 
-def get_rst_formatter(
+def get_rst_formatter_link_provider(
     output_format: OutputFormat,
     referable_envvars: set[str] | None = None,
-) -> Formatter:
+) -> tuple[Formatter, LinkProvider | None]:
     if output_format == OutputFormat.ANSIBLE_DOCSITE:
-        return AnsibleDocsiteFormatter(referable_envvars)
+        return (AnsibleDocsiteFormatter(referable_envvars), None)
+    if output_format == OutputFormat.SIMPLIFIED_RST:
+        return (SimplifiedRSTFormatter(), SimplifiedRSTLinkProvider())
     raise ValueError(f"Unknown output format {output_format}")
diff --git a/src/antsibull_docs/write_docs/collections.py b/src/antsibull_docs/write_docs/collections.py
index a612f771..d3bd6299 100644
--- a/src/antsibull_docs/write_docs/collections.py
+++ b/src/antsibull_docs/write_docs/collections.py
@@ -21,7 +21,8 @@
 from ..collection_links import CollectionLinks
 from ..docs_parsing import AnsibleCollectionMetadata
 from ..extra_docs import CollectionExtraDocsInfoT
-from ..jinja2.environment import OutputFormat, doc_environment, get_template_filename
+from ..jinja2 import FilenameGenerator, OutputFormat
+from ..jinja2.environment import doc_environment, get_template_filename
 from ..utils.collection_name_transformer import CollectionNameTransformer
 from . import CollectionInfoT, _render_template
 
@@ -61,6 +62,8 @@ async def write_plugin_lists(
     collection_meta: AnsibleCollectionMetadata,
     extra_docs_data: CollectionExtraDocsInfoT,
     link_data: CollectionLinks,
+    output_format: OutputFormat,
+    filename_generator: FilenameGenerator,  # pylint: disable=unused-argument
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
     squash_hierarchy: bool = False,
@@ -119,7 +122,7 @@ async def write_plugin_lists(
     # This is only safe because we made sure that the top of the directory tree we're writing to
     # (docs/docsite/rst) is only writable by us.
     os.makedirs(dest_dir, mode=0o755, exist_ok=True)
-    index_file = os.path.join(dest_dir, "index.rst")
+    index_file = os.path.join(dest_dir, f"index{output_format.output_extension}")
 
     await write_file(index_file, index_contents)
 
@@ -135,6 +138,7 @@ async def output_indexes(
     collection_url: CollectionNameTransformer,
     collection_install: CollectionNameTransformer,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     squash_hierarchy: bool = False,
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
@@ -169,6 +173,7 @@ async def output_indexes(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     collection_plugins_tmpl = env.get_template(
@@ -207,6 +212,8 @@ async def output_indexes(
                         collection_metadata[collection_name],
                         extra_docs_data[collection_name],
                         link_data[collection_name],
+                        output_format,
+                        filename_generator,
                         breadcrumbs=breadcrumbs,
                         for_official_docsite=for_official_docsite,
                         squash_hierarchy=squash_hierarchy,
diff --git a/src/antsibull_docs/write_docs/hierarchy.py b/src/antsibull_docs/write_docs/hierarchy.py
index eb149b37..5a0506b8 100644
--- a/src/antsibull_docs/write_docs/hierarchy.py
+++ b/src/antsibull_docs/write_docs/hierarchy.py
@@ -18,7 +18,8 @@
 from antsibull_core.utils.io import write_file
 from jinja2 import Template
 
-from ..jinja2.environment import OutputFormat, doc_environment, get_template_filename
+from ..jinja2 import FilenameGenerator, OutputFormat
+from ..jinja2.environment import doc_environment, get_template_filename
 from ..utils.collection_name_transformer import CollectionNameTransformer
 from . import CollectionInfoT, _render_template
 
@@ -30,6 +31,8 @@ async def write_collection_list(
     namespaces: Iterable[str],
     template: Template,
     dest_dir: str,
+    output_format: OutputFormat,
+    filename_generator: FilenameGenerator,  # pylint: disable=unused-argument
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
 ) -> None:
@@ -55,7 +58,7 @@ async def write_collection_list(
         breadcrumbs=breadcrumbs,
         for_official_docsite=for_official_docsite,
     )
-    index_file = os.path.join(dest_dir, "index.rst")
+    index_file = os.path.join(dest_dir, f"index{output_format.output_extension}")
 
     await write_file(index_file, index_contents)
 
@@ -65,6 +68,8 @@ async def write_collection_namespace_index(
     collections: Iterable[str],
     template: Template,
     dest_dir: str,
+    output_format: OutputFormat,
+    filename_generator: FilenameGenerator,  # pylint: disable=unused-argument
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
 ) -> None:
@@ -90,7 +95,7 @@ async def write_collection_namespace_index(
         breadcrumbs=breadcrumbs,
         for_official_docsite=for_official_docsite,
     )
-    index_file = os.path.join(dest_dir, "index.rst")
+    index_file = os.path.join(dest_dir, f"index{output_format.output_extension}")
 
     await write_file(index_file, index_contents)
 
@@ -102,6 +107,7 @@ async def output_collection_index(
     collection_url: CollectionNameTransformer,
     collection_install: CollectionNameTransformer,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
     referable_envvars: set[str] | None = None,
@@ -128,6 +134,7 @@ async def output_collection_index(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     collection_list_tmpl = env.get_template(
@@ -147,6 +154,8 @@ async def output_collection_index(
         collection_namespaces.keys(),
         collection_list_tmpl,
         collection_toplevel,
+        output_format,
+        filename_generator,
         breadcrumbs=breadcrumbs,
         for_official_docsite=for_official_docsite,
     )
@@ -160,6 +169,7 @@ async def output_collection_namespace_indexes(
     collection_url: CollectionNameTransformer,
     collection_install: CollectionNameTransformer,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     breadcrumbs: bool = True,
     for_official_docsite: bool = False,
     referable_envvars: set[str] | None = None,
@@ -184,6 +194,7 @@ async def output_collection_namespace_indexes(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     collection_list_tmpl = env.get_template(
@@ -206,6 +217,8 @@ async def output_collection_namespace_indexes(
                         collection_names,
                         collection_list_tmpl,
                         namespace_dir,
+                        output_format,
+                        filename_generator,
                         breadcrumbs=breadcrumbs,
                         for_official_docsite=for_official_docsite,
                     )
diff --git a/src/antsibull_docs/write_docs/indexes.py b/src/antsibull_docs/write_docs/indexes.py
index e9c2903a..141633be 100644
--- a/src/antsibull_docs/write_docs/indexes.py
+++ b/src/antsibull_docs/write_docs/indexes.py
@@ -20,7 +20,8 @@
 
 from ..docs_parsing import AnsibleCollectionMetadata
 from ..env_variables import EnvironmentVariableInfo
-from ..jinja2.environment import OutputFormat, doc_environment, get_template_filename
+from ..jinja2 import FilenameGenerator, OutputFormat
+from ..jinja2.environment import doc_environment, get_template_filename
 from ..utils.collection_name_transformer import CollectionNameTransformer
 from . import PluginCollectionInfoT, _render_template
 
@@ -94,6 +95,7 @@ async def output_callback_indexes(
     collection_url: CollectionNameTransformer,
     collection_install: CollectionNameTransformer,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     for_official_docsite: bool = False,
     referable_envvars: set[str] | None = None,
 ) -> None:
@@ -117,6 +119,7 @@ async def output_callback_indexes(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     plugin_list_tmpl = env.get_template(
@@ -136,7 +139,8 @@ async def output_callback_indexes(
     async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool:
         for callback_type, per_collection_data in plugin_info.items():
             filename = os.path.join(
-                collection_toplevel, f"callback_index_{callback_type}.rst"
+                collection_toplevel,
+                f"callback_index_{callback_type}{output_format.output_extension}",
             )
             writers.append(
                 await pool.spawn(
@@ -162,6 +166,7 @@ async def output_plugin_indexes(
     collection_url: CollectionNameTransformer,
     collection_install: CollectionNameTransformer,
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     for_official_docsite: bool = False,
     referable_envvars: set[str] | None = None,
 ) -> None:
@@ -185,6 +190,7 @@ async def output_plugin_indexes(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     plugin_list_tmpl = env.get_template(
@@ -203,7 +209,10 @@ async def output_plugin_indexes(
     lib_ctx = app_context.lib_ctx.get()
     async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool:
         for plugin_type, per_collection_data in plugin_info.items():
-            filename = os.path.join(collection_toplevel, f"index_{plugin_type}.rst")
+            filename = os.path.join(
+                collection_toplevel,
+                f"index_{plugin_type}{output_format.output_extension}",
+            )
             writers.append(
                 await pool.spawn(
                     write_plugin_type_index(
@@ -226,6 +235,7 @@ async def output_environment_variables(
     dest_dir: str,
     env_variables: Mapping[str, EnvironmentVariableInfo],
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     squash_hierarchy: bool = False,
     referable_envvars: set[str] | None = None,
 ) -> None:
@@ -251,6 +261,7 @@ async def output_environment_variables(
     env = doc_environment(
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     env_var_list_tmpl = env.get_template(
@@ -264,7 +275,9 @@ async def output_environment_variables(
     # (docs/docsite/rst) is only writable by us.
     os.makedirs(collection_toplevel, mode=0o755, exist_ok=True)
 
-    index_file = os.path.join(collection_toplevel, "environment_variables.rst")
+    index_file = os.path.join(
+        collection_toplevel, f"environment_variables{output_format.output_extension}"
+    )
     index_contents = _render_template(
         env_var_list_tmpl,
         index_file,
diff --git a/src/antsibull_docs/write_docs/plugin_stubs.py b/src/antsibull_docs/write_docs/plugin_stubs.py
index 345bdc87..b49c4a06 100644
--- a/src/antsibull_docs/write_docs/plugin_stubs.py
+++ b/src/antsibull_docs/write_docs/plugin_stubs.py
@@ -21,7 +21,8 @@
 
 from ..collection_links import CollectionLinks
 from ..docs_parsing import AnsibleCollectionMetadata
-from ..jinja2.environment import OutputFormat, doc_environment, get_template_filename
+from ..jinja2 import FilenameGenerator, OutputFormat
+from ..jinja2.environment import doc_environment, get_template_filename
 from ..utils.collection_name_transformer import CollectionNameTransformer
 from . import _render_template
 
@@ -38,6 +39,8 @@ async def write_stub_rst(
     redirect_tmpl: Template,
     tombstone_tmpl: Template,
     dest_dir: str,
+    output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     path_override: str | None = None,
     squash_hierarchy: bool = False,
     for_official_docsite: bool = False,
@@ -112,7 +115,8 @@ async def write_stub_rst(
             os.makedirs(collection_dir, mode=0o755, exist_ok=True)
 
         plugin_file = os.path.join(
-            collection_dir, f"{plugin_short_name}_{plugin_type}.rst"
+            collection_dir,
+            filename_generator.plugin_filename(plugin_name, plugin_type, output_format),
         )
 
     await write_file(plugin_file, plugin_contents)
@@ -128,6 +132,7 @@ async def output_all_plugin_stub_rst(
     collection_metadata: Mapping[str, AnsibleCollectionMetadata],
     link_data: Mapping[str, CollectionLinks],
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     squash_hierarchy: bool = False,
     for_official_docsite: bool = False,
     referable_envvars: set[str] | None = None,
@@ -154,6 +159,7 @@ async def output_all_plugin_stub_rst(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     redirect_tmpl = env.get_template(
@@ -181,6 +187,8 @@ async def output_all_plugin_stub_rst(
                                 redirect_tmpl,
                                 tombstone_tmpl,
                                 dest_dir,
+                                output_format,
+                                filename_generator,
                                 squash_hierarchy=squash_hierarchy,
                                 for_official_docsite=for_official_docsite,
                             )
diff --git a/src/antsibull_docs/write_docs/plugins.py b/src/antsibull_docs/write_docs/plugins.py
index c0e9d3eb..19ee9a00 100644
--- a/src/antsibull_docs/write_docs/plugins.py
+++ b/src/antsibull_docs/write_docs/plugins.py
@@ -21,7 +21,8 @@
 
 from ..collection_links import CollectionLinks
 from ..docs_parsing import AnsibleCollectionMetadata
-from ..jinja2.environment import OutputFormat, doc_environment, get_template_filename
+from ..jinja2 import FilenameGenerator, OutputFormat
+from ..jinja2.environment import doc_environment, get_template_filename
 from ..utils.collection_name_transformer import CollectionNameTransformer
 from . import CollectionInfoT, PluginErrorsT, _render_template
 
@@ -259,6 +260,8 @@ async def write_plugin_rst(
     plugin_tmpl: Template,
     error_tmpl: Template,
     dest_dir: str,
+    output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     path_override: str | None = None,
     squash_hierarchy: bool = False,
     use_html_blobs: bool = False,
@@ -322,7 +325,10 @@ async def write_plugin_rst(
             os.makedirs(collection_dir, mode=0o755, exist_ok=True)
 
         plugin_file = os.path.join(
-            collection_dir, f"{plugin_short_name}_{plugin_type}.rst"
+            collection_dir,
+            filename_generator.plugin_filename(
+                f"{collection_name}.{plugin_short_name}", plugin_type, output_format
+            ),
         )
 
     await write_file(plugin_file, plugin_contents)
@@ -340,6 +346,7 @@ async def output_all_plugin_rst(
     collection_metadata: Mapping[str, AnsibleCollectionMetadata],
     link_data: Mapping[str, CollectionLinks],
     output_format: OutputFormat,
+    filename_generator: FilenameGenerator,
     squash_hierarchy: bool = False,
     use_html_blobs: bool = False,
     for_official_docsite: bool = False,
@@ -372,6 +379,7 @@ async def output_all_plugin_rst(
         collection_install=collection_install,
         referable_envvars=referable_envvars,
         output_format=output_format,
+        filename_generator=filename_generator,
     )
     # Get the templates
     plugin_tmpl = env.get_template(get_template_filename("plugin", output_format))
@@ -401,6 +409,8 @@ async def output_all_plugin_rst(
                                 plugin_type_tmpl,
                                 error_tmpl,
                                 dest_dir,
+                                output_format,
+                                filename_generator,
                                 squash_hierarchy=squash_hierarchy,
                                 use_html_blobs=use_html_blobs,
                                 for_official_docsite=for_official_docsite,


Test patch:
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_filter.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_filter.rst
new file mode 100644
index 00000000..ff5b2e15
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_filter.rst
@@ -0,0 +1,245 @@
+
+
+ns2.col.bar filter -- The bar filter
+++++++++++++++++++++++++++++++++++++
+
+This filter plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.bar`.
+
+New in ns2.col 2.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Do some barring.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the filter, the value before ``| ns2.col.bar``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The main input.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Positional parameters
+---------------------
+
+This describes positional parameters of the filter. These are the values ``positional1``, ``positional2`` and so on in the following
+example: ``input | ns2.col.bar(positional1, positional2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>And some bar.</p>
+      <p style="margin-top: 8px;"><b">Choices:</b></p>
+      <ul>
+        <li><p><code style="color: blue;"><b>false</b></code> <span style="color: blue;">← (default)</span></p></li>
+        <li><p><code>true</code></p></li>
+      </ul>
+
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+example: ``input | ns2.col.bar(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-baz"></div>
+      <p style="display: inline;"><strong>baz</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-baz" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Something else.</p>
+      <p style="margin-top: 8px;"><b">Choices:</b></p>
+      <ul>
+        <li>
+          <p><code>&#34;a&#34;</code>:
+          Whatever <code class='docutils literal notranslate'>a</code> is.</p>
+        </li>
+        <li>
+          <p><code>&#34;b&#34;</code>:
+          What is <code class='docutils literal notranslate'>b</code>? I don&#x27;t know.</p>
+        </li>
+        <li>
+          <p><code>&#34;cde&#34;</code>:
+          This is some more unknown. There are rumors this is related to the alphabet.</p>
+        </li>
+        <li>
+          <p><code style="color: blue;"><b>&#34;foo&#34;</b></code> <span style="color: blue;">(default)</span>:
+          Our default value, the glorious <code class='docutils literal notranslate'>foo</code>.</p>
+          <p>Even has two paragraphs.</p>
+        </li>
+      </ul>
+
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
+  ``input | ns2.col.bar(positional1, positional2, key1=value1, key2=value2)``
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    {'a': 1} | ns2.col.bar({'b': 2}, baz='cde')
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The result.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_test.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_test.rst
new file mode 100644
index 00000000..be1d7c35
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/bar_test.rst
@@ -0,0 +1,130 @@
+
+
+ns2.col.bar test -- Is something a bar
+++++++++++++++++++++++++++++++++++++++
+
+This test plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.bar`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Check whether a path is a bar.
+
+
+Aliases: is_bar
+
+
+
+
+
+Input
+-----
+
+This describes the input of the test, the value before ``is ns2.col.bar`` or ``is not ns2.col.bar``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">path</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>A path.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    is_path_bar: "{{ '/etc/hosts' is ns2.col.bar }}}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Returns <code class='docutils literal notranslate'>true</code> if the path is a bar, <code class='docutils literal notranslate'>false</code> if it is not a bar.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/docsite/filter_guide.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/docsite/filter_guide.rst
new file mode 100644
index 00000000..0354846d
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/docsite/filter_guide.rst
@@ -0,0 +1,30 @@
+..
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+
+.. _ansible_collections.ns2.col.docsite.filter_guide:
+
+Filter Guide
+============
+
+.. contents:: Contents
+   :local:
+   :depth: 1
+
+The :ref:`ns2.col collection <plugins_in_ns2.col>` offers two filters.
+
+- ``ns2.col.foo``: foo!
+- ``ns2.col.bar``: bar!
+
+.. envvar:: FOOBAR1
+
+    This is one environment variable.
+
+.. envvar:: FOOBAR2
+
+    This is another environment variable.
+
+.. envvar:: FOOBAR3
+
+    This is a third environment variable.
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo2_module.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo2_module.rst
new file mode 100644
index 00000000..fb6b043f
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo2_module.rst
@@ -0,0 +1,198 @@
+
+
+ns2.col.foo2 module -- Another foo
+++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo2`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Foo bar.
+- See \ :literal:`foo\_param\_1` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for a random role parameter reference. And \ :literal:`foo\_param\_2=42` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for one with a value.
+- Reference using alias - \ :literal:`bar` (of module `ns2.col.foo\_redirect <foo_redirect_module.rst>`__)\  and \ :literal:`baz` (of module `ns2.col.foo\_redirect <foo_redirect_module.rst>`__)\ .
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>See <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> for a random role parameter reference. And <code class="ansible-option-value literal notranslate"><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=42</span></span></a></code> for one with a value.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action groups: \ns2.col.bar\_group, ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  or \ :literal:`group/ns2.col.bar\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: N/A
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.col.foo2:
+        bar: foo
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Another one (@ansible-community)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_become.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_become.rst
new file mode 100644
index 00000000..e0389a76
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_become.rst
@@ -0,0 +1,225 @@
+
+
+ns2.col.foo become -- Use foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This become plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+DEPRECATED
+----------
+:Removed in: version 5.0.0
+:Why: Just some text.
+      This one has more than one line.
+      And one more.
+
+:Alternative: I don't know
+              of any
+              alternative.
+
+
+Synopsis
+--------
+
+- This become plugin uses foo.
+- This is a second paragraph.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 1.2.0</i></p>
+  <p>Removed in: version 4.0.0</p>
+  <p>Why: Just some other text.
+  This one has more than one line though.
+  One more.
+  </p>
+  <p>Alternative: nothing
+  relevant
+  I know of
+  </p>
+
+    </td>
+    <td valign="top">
+      <p>Bar. <b>BAR!</b></p>
+      <p>Totally unrelated to <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user</span></span></a></strong></code>. Even with <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user=foo</span></span></a></code>.</p>
+      <p>Might not be compatible when <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user</span></span></a></strong></code> is <code class="ansible-value literal notranslate">bar</code>, though.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-become_exe"></div>
+      <p style="display: inline;"><strong>become_exe</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-become_exe" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.2.0</i></p>
+
+    </td>
+    <td valign="top">
+      <p>Foo executable.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;foo&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entries</p>
+        <pre>[privilege_escalation]
+  become_exe = foo</pre>
+
+        <pre>[foo_become_plugin]
+  executable = foo</pre>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_BECOME_EXE</code></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_EXE</code></p>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_become_exe</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_foo_exe</p>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Keyword: become_exe</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-become_user"></div>
+      <p style="display: inline;"><strong>become_user</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-become_user" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>User you &#x27;become&#x27; to execute the task.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;root&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entries</p>
+        <pre>[privilege_escalation]
+  become_user = root</pre>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+        <pre>[foo_become_plugin]
+  user = root</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_BECOME_USER</code></p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_USER</code></p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_become_user</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_foo_user</p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      <li>
+        <p>Keyword: become_user</p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+- This become will be removed in version 5.0.0.
+  *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Nobody 
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cache.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cache.rst
new file mode 100644
index 00000000..30d802ef
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cache.rst
@@ -0,0 +1,115 @@
+
+
+ns2.col.foo cache -- Foo files \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This cache plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.9.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Cache foo files.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_uri"></div>
+      <p style="display: inline;"><strong>_uri</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_uri" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">path</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Path in which the cache plugin will save the foo files.</p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  fact_caching_connection = VALUE</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_CACHE_PLUGIN_CONNECTION</code></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Nothing.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core (@ansible-core)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_callback.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_callback.rst
new file mode 100644
index 00000000..a2fa5115
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_callback.rst
@@ -0,0 +1,87 @@
+
+
+ns2.col.foo callback -- Foo output \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This callback plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.0.1
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Callback plugin
+---------------
+
+This plugin is a **stdout callback**. You can use only use one stdout callback at a time. Additional aggregate or notification callbacks can be enabled though.
+
+Synopsis
+--------
+
+- Absolut minimal foo output.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Nothing.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cliconf.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cliconf.rst
new file mode 100644
index 00000000..54bec27c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_cliconf.rst
@@ -0,0 +1,55 @@
+
+
+ns2.col.foo cliconf -- Foo router CLI config
+++++++++++++++++++++++++++++++++++++++++++++
+
+This cliconf plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is a CLI config for foo routers. Whatever these are.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Felix Fontein (@felixfontein) 
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_connection.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_connection.rst
new file mode 100644
index 00000000..59c149df
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_connection.rst
@@ -0,0 +1,130 @@
+
+
+ns2.col.foo connection -- Foo connection \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This connection plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.2.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is for the \ :literal:`foo`\  connection.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">integer</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-host"></div>
+      <p style="display: inline;"><strong>host</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-host" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Hostname to connect to.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;inventory_hostname&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>Variable: inventory_hostname</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_host</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_ssh_host</p>
+
+      </li>
+      <li>
+        <p>Variable: delegated_vars[&#39;ansible_host&#39;]</p>
+
+      </li>
+      <li>
+        <p>Variable: delegated_vars[&#39;ansible_ssh_host&#39;]</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- Some note. \ :strong:`Something in bold`\ . \ :literal:`And in code`\ . \ :emphasis:`And in italics`\ . An URL: \ https://example.org\ .
+- And another one. \ `A link <https://example.com>`__\ .
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- ansible (@core)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_filter.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_filter.rst
new file mode 100644
index 00000000..d0ef824c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_filter.rst
@@ -0,0 +1,177 @@
+
+
+ns2.col.foo filter -- The foo filter \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This filter plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.3.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Do some fooing.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the filter, the value before ``| ns2.col.foo``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The main input.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+example: ``input | ns2.col.foo(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some foo.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    some_var: "{{ 'foo' | ns2.col.foo }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The result.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_inventory.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_inventory.rst
new file mode 100644
index 00000000..1fa1e5c1
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_inventory.rst
@@ -0,0 +1,92 @@
+
+
+ns2.col.foo inventory -- The foo inventory \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This inventory plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.5.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Loads inventory from foo.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    foo:
+        bar!
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_lookup.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_lookup.rst
new file mode 100644
index 00000000..2febbc63
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_lookup.rst
@@ -0,0 +1,174 @@
+
+
+ns2.col.foo lookup -- Look up some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This lookup plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This looks up some foo.
+- Whatever that is.
+
+
+
+
+
+
+Terms
+-----
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_terms"></div>
+      <p style="display: inline;"><strong>Terms</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_terms" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The stuff to look up.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the lookup. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+examples: ``lookup('ns2.col.foo', key1=value1, key2=value2, ...)`` and ``query('ns2.col.foo', key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
+  ``lookup('ns2.col.foo', term1, term2, key1=value1, key2=value2)`` and ``query('ns2.col.foo', term1, term2, key1=value1, key2=value2)``
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Look up bar
+      ansible.builtin.debug:
+        msg: "{{ lookup('ns2.col.foo', 'bar') }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_raw"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_raw" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The resulting stuff.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Felix Fontein (@felixfontein)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_module.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_module.rst
new file mode 100644
index 00000000..692ecf2e
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_module.rst
@@ -0,0 +1,282 @@
+
+
+ns2.col.foo module -- Do some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+You need further requirements to be able to use this module,
+see `Requirements <ansible_collections.ns2.col.foo_module_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 2.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Does some foo on the remote host.
+- Whether foo is magic or not has not yet been determined.
+- \ :literal:`FOOBAR1`\ , \ :literal:`FOOBAR2`\ , \ :literal:`FOOBAR3`\ , \ :literal:`FOOBAR4`\ .
+
+
+Aliases: foo_redirect
+
+.. _ansible_collections.ns2.col.foo_module_requirements:
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- Foo on remote.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th colspan="2"><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <div class="ansibleOptionAnchor" id="parameter-baz"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: baz</span></p>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A bar.</p>
+      <p>Independent from <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo</span></span></a></strong></code>.</p>
+      <p>Do not confuse with <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The foo source.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo"></div>
+      <p style="display: inline;"><strong>subfoo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 2.0.0</i></p>
+    </td>
+    <td valign="top">
+      <p>Some recursive foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A sub foo.</p>
+      <p>Whatever.</p>
+      <p>Also required when <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subfoo"><span class="std std-ref"><span class="pre">subfoo</span></span></a></strong></code> is specified when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo=bar</span></span></a></code> or <code class="ansible-value literal notranslate">baz</code>.</p>
+    </td>
+  </tr>
+
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action group: \ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+See Also
+--------
+
+* \ `ns2.col.foo2 <foo2_module.rst>`__\ 
+
+  Another foo.
+* \ `ns2.col.foo <foo_lookup.rst>`__\  lookup plugin
+
+  Look up some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ .
+* \ `ansible.builtin.service <service_module.rst>`__\ 
+
+  The service module.
+* \ `ansible.builtin.ssh <ssh_connection.rst>`__\  connection plugin
+
+  The ssh connection plugin.
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.col.foo:
+        foo: '{{ foo }}'
+        bar:
+          - 1
+          - 2
+          - 3
+        subfoo:
+          foo: hoo!
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core Team
+- Someone else (@ansible)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_redirect_module.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_redirect_module.rst
new file mode 100644
index 00000000..4b7c358c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_redirect_module.rst
@@ -0,0 +1,10 @@
+
+ns2.col.foo_redirect module
++++++++++++++++++++++++++++
+
+- This redirect is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+  To use it in a playbook, specify: :code:`ns2.col.foo_redirect`.
+
+- This is a redirect to the ns2.col.foo module.
+- This redirect does **not** work with Ansible 2.9.
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_role.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_role.rst
new file mode 100644
index 00000000..cfae9a83
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_role.rst
@@ -0,0 +1,140 @@
+
+
+ns2.col.foo role -- Foo role
+++++++++++++++++++++++++++++
+
+This role is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+.. contents::
+   :local:
+   :depth: 2
+
+
+Entry point ``main`` -- Foo role
+--------------------------------
+
+New in ns2.col 0.2.0
+
+DEPRECATED
+^^^^^^^^^^
+:Removed in: version 5.0.0
+:Why: Just some text.
+      This one has more than one line.
+      And one more.
+
+:Alternative: I don't know
+              of any
+              alternative.
+
+
+Synopsis
+^^^^^^^^
+
+- This is the foo role.
+- If you set \ :literal:`foo\_param\_1` (`link <parameter-main__foo_param_1_>`_)\  while \ :literal:`foo\_param\_2=3` (`link <parameter-main__foo_param_2_>`_)\ , this might behave funny.
+
+
+Parameters
+^^^^^^^^^^
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-main--foo_param_1"></div>
+      <p style="display: inline;"><strong>foo_param_1</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-main--foo_param_1" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>A string parameter</p>
+      <p>If you set <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> while <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=3</span></span></a></code>, this might behave funny.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-main--foo_param_2"></div>
+      <p style="display: inline;"><strong>foo_param_2</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-main--foo_param_2" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">integer</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>An integer parameter with a default.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">13</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo_role__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+
+
+See Also
+^^^^^^^^
+
+* \ `ns2.col.foo <foo_module.rst>`__\ 
+
+  The official documentation on the **ns2.col.foo** module.
+
+Authors
+^^^^^^^
+
+- Felix Fontein (@felixfontein)
+
+
+
+.. Extra links
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_shell.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_shell.rst
new file mode 100644
index 00000000..1e534045
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_shell.rst
@@ -0,0 +1,119 @@
+
+
+ns2.col.foo shell -- Foo shell \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This shell plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is for the foo shell.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-remote_tmp"></div>
+      <p style="display: inline;"><strong>remote_tmp</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-remote_tmp" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ansible-base 2.10</i></p>
+
+    </td>
+    <td valign="top">
+      <p>Temporary directory to use on targets when executing tasks.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;~/.ansible/tmp&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  remote_tmp = ~/.ansible/tmp</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_REMOTE_TEMP</code></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_REMOTE_TMP</code></p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_remote_tmp</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_strategy.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_strategy.rst
new file mode 100644
index 00000000..0fc060c0
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_strategy.rst
@@ -0,0 +1,56 @@
+
+
+ns2.col.foo strategy -- Executes tasks in foo
++++++++++++++++++++++++++++++++++++++++++++++
+
+This strategy plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.1.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is something funny. Or at least I think so from its name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core Team
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_test.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_test.rst
new file mode 100644
index 00000000..f1258e10
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_test.rst
@@ -0,0 +1,165 @@
+
+
+ns2.col.foo test -- Is something a foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This test plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Check whether the input dictionary is a foo.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the test, the value before ``is ns2.col.foo`` or ``is not ns2.col.foo``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Something to test.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the test. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+examples: ``input is ns2.col.foo(key1=value1, key2=value2, ...)`` and ``input is not ns2.col.foo(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    some_var: "{{ {'a': 1} is ns2.col.foo }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Whether the input is a foo.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Nobody
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_vars.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_vars.rst
new file mode 100644
index 00000000..d497cec4
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/foo_vars.rst
@@ -0,0 +1,122 @@
+
+
+ns2.col.foo vars -- Load foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This vars plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+You need further requirements to be able to use this vars plugin,
+see `Requirements <ansible_collections.ns2.col.foo_vars_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.9.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Load some foo.
+- This is so glorious.
+
+
+
+.. _ansible_collections.ns2.col.foo_vars_requirements:
+
+Requirements
+------------
+The below requirements are needed on the local controller node that executes this vars.
+
+- Enabled in Ansible's configuration.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_valid_extensions"></div>
+      <p style="display: inline;"><strong>_valid_extensions</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_valid_extensions" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>All extensions to check.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">[&#34;.foo&#34;, &#34;.foobar&#34;]</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  foo_valid_extensions = .foo, .foobar</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_FILENAME_EXT</code></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/index.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/index.rst
new file mode 100644
index 00000000..a67dc2f5
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/index.rst
@@ -0,0 +1,148 @@
+
+
+Ns2.Col
+=======
+
+Collection version 2.1.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+Description
+-----------
+
+This is a description.
+
+With multiple paragraphs.
+
+
+**Author:**
+
+* Ansible (https://github.com/ansible)
+
+**Supported ansible-core versions:**
+
+* 2.11.0 or newer
+* older than 2.99.0
+* version 2.12.2 is specifically not supported
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
+
+Communication
+-------------
+
+- Matrix room :literal:`#users:ansible.im`: `General usage and support questions <https://matrix.to/#/#users:ansible.im>`__.
+- IRC channel :literal:`#ansible` (Libera network):
+  `General usage and support questions <https://web.libera.chat/?channel=#ansible>`__.
+- Mailing list: `Ansible Project List <https://groups.google.com/g/ansible-project>`__.
+  (`Subscribe <mailto:ansible-project+subscribe@googlegroups.com?subject=subscribe>`__)
+
+Guides
+------
+
+* `<docsite/filter_guide.rst>`_
+
+
+Plugin Index
+------------
+
+These are the plugins in the ns2.col collection:
+
+
+Modules
+~~~~~~~
+
+* `foo module <foo_module.rst>`_ -- Do some foo \ :literal:`bar` (of module `ns2.col.foo <foo_module.rst>`__)\ 
+* `foo2 module <foo2_module.rst>`_ -- Another foo
+* `sub.foo3 module <sub.foo3_module.rst>`_ -- A sub-foo
+
+
+Become Plugins
+~~~~~~~~~~~~~~
+
+* `foo become <foo_become.rst>`_ -- Use foo \ :literal:`bar` (of become plugin `ns2.col.foo <foo_become.rst>`__)\ 
+
+
+Cache Plugins
+~~~~~~~~~~~~~
+
+* `foo cache <foo_cache.rst>`_ -- Foo files \ :literal:`bar` (of cache plugin `ns2.col.foo <foo_cache.rst>`__)\ 
+
+
+Callback Plugins
+~~~~~~~~~~~~~~~~
+
+* `foo callback <foo_callback.rst>`_ -- Foo output \ :literal:`bar` (of callback plugin `ns2.col.foo <foo_callback.rst>`__)\ 
+
+
+Cliconf Plugins
+~~~~~~~~~~~~~~~
+
+* `foo cliconf <foo_cliconf.rst>`_ -- Foo router CLI config
+
+
+Connection Plugins
+~~~~~~~~~~~~~~~~~~
+
+* `foo connection <foo_connection.rst>`_ -- Foo connection \ :literal:`bar` (of connection plugin `ns2.col.foo <foo_connection.rst>`__)\ 
+
+
+Filter Plugins
+~~~~~~~~~~~~~~
+
+* `bar filter <bar_filter.rst>`_ -- The bar filter
+* `foo filter <foo_filter.rst>`_ -- The foo filter \ :literal:`bar` (of filter plugin `ns2.col.foo <foo_filter.rst>`__)\ 
+
+
+Inventory Plugins
+~~~~~~~~~~~~~~~~~
+
+* `foo inventory <foo_inventory.rst>`_ -- The foo inventory \ :literal:`bar` (of inventory plugin `ns2.col.foo <foo_inventory.rst>`__)\ 
+
+
+Lookup Plugins
+~~~~~~~~~~~~~~
+
+* `foo lookup <foo_lookup.rst>`_ -- Look up some foo \ :literal:`bar` (of lookup plugin `ns2.col.foo <foo_lookup.rst>`__)\ 
+
+
+Shell Plugins
+~~~~~~~~~~~~~
+
+* `foo shell <foo_shell.rst>`_ -- Foo shell \ :literal:`bar` (of shell plugin `ns2.col.foo <foo_shell.rst>`__)\ 
+
+
+Strategy Plugins
+~~~~~~~~~~~~~~~~
+
+* `foo strategy <foo_strategy.rst>`_ -- Executes tasks in foo
+
+
+Test Plugins
+~~~~~~~~~~~~
+
+* `bar test <bar_test.rst>`_ -- Is something a bar
+* `foo test <foo_test.rst>`_ -- Is something a foo \ :literal:`bar` (of test plugin `ns2.col.foo <foo_test.rst>`__)\ 
+
+
+Vars Plugins
+~~~~~~~~~~~~
+
+* `foo vars <foo_vars.rst>`_ -- Load foo \ :literal:`bar` (of vars plugin `ns2.col.foo <foo_vars.rst>`__)\ 
+
+
+Role Index
+----------
+
+These are the roles in the ns2.col collection:
+
+* `foo role <foo_role.rst>`_ -- Foo role
+
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/is_bar_test.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/is_bar_test.rst
new file mode 100644
index 00000000..9d4e54b0
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/is_bar_test.rst
@@ -0,0 +1,10 @@
+
+ns2.col.is_bar test
++++++++++++++++++++
+
+- This redirect is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+  To use it in a playbook, specify: :code:`ns2.col.is_bar`.
+
+- This is a redirect to the ns2.col.bar test plugin.
+- This redirect does **not** work with Ansible 2.9.
diff --git a/tests/functional/baseline-simplified-rst-squash-hierarchy/sub.foo3_module.rst b/tests/functional/baseline-simplified-rst-squash-hierarchy/sub.foo3_module.rst
new file mode 100644
index 00000000..334ef385
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst-squash-hierarchy/sub.foo3_module.rst
@@ -0,0 +1,197 @@
+
+
+ns2.col.sub.foo3 module -- A sub-foo
+++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.sub.foo3`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Foo sub bar.
+- See \ :literal:`foo\_param\_1` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for a random role parameter reference. And \ :literal:`foo\_param\_2=42` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for one with a value.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>See <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> for a random role parameter reference. And <code class="ansible-option-value literal notranslate"><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=42</span></span></a></code> for one with a value.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action groups: \ns2.col.bar\_group, ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  or \ :literal:`group/ns2.col.bar\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: N/A
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foobar
+      ns2.col.sub.foo3:
+        bar: baz
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Another one (@ansible-community)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/callback_index_stdout.rst b/tests/functional/baseline-simplified-rst/collections/callback_index_stdout.rst
new file mode 100644
index 00000000..39e3db7d
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/callback_index_stdout.rst
@@ -0,0 +1,11 @@
+
+Index of all Stdout Callback Plugins
+====================================
+
+See `List of all Callback Plugins <index_callback.rst>`_ for the list of *all* callback plugins.
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_callback.rst>`_ -- Foo output \ :literal:`bar` (of callback plugin `ns2.col.foo <foo_callback.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index.rst b/tests/functional/baseline-simplified-rst/collections/index.rst
new file mode 100644
index 00000000..e9adc8e7
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index.rst
@@ -0,0 +1,10 @@
+
+Collection Index
+================
+
+These are the collections documented here.
+
+* `ns.col1 <ns/col1/index.rst>`_
+* `ns.col2 <ns/col2/index.rst>`_
+* `ns2.col <ns2/col/index.rst>`_
+* `ns2.flatcol <ns2/flatcol/index.rst>`_
diff --git a/tests/functional/baseline-simplified-rst/collections/index_become.rst b/tests/functional/baseline-simplified-rst/collections/index_become.rst
new file mode 100644
index 00000000..a7694c6c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_become.rst
@@ -0,0 +1,9 @@
+
+Index of all Become Plugins
+===========================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_become.rst>`_ -- Use foo \ :literal:`bar` (of become plugin `ns2.col.foo <foo_become.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_cache.rst b/tests/functional/baseline-simplified-rst/collections/index_cache.rst
new file mode 100644
index 00000000..9a0040d3
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_cache.rst
@@ -0,0 +1,9 @@
+
+Index of all Cache Plugins
+==========================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_cache.rst>`_ -- Foo files \ :literal:`bar` (of cache plugin `ns2.col.foo <foo_cache.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_callback.rst b/tests/functional/baseline-simplified-rst/collections/index_callback.rst
new file mode 100644
index 00000000..c6c6336d
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_callback.rst
@@ -0,0 +1,9 @@
+
+Index of all Callback Plugins
+=============================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_callback.rst>`_ -- Foo output \ :literal:`bar` (of callback plugin `ns2.col.foo <foo_callback.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_cliconf.rst b/tests/functional/baseline-simplified-rst/collections/index_cliconf.rst
new file mode 100644
index 00000000..5ae52ea6
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_cliconf.rst
@@ -0,0 +1,9 @@
+
+Index of all Cliconf Plugins
+============================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_cliconf.rst>`_ -- Foo router CLI config
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_connection.rst b/tests/functional/baseline-simplified-rst/collections/index_connection.rst
new file mode 100644
index 00000000..dbb5be43
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_connection.rst
@@ -0,0 +1,9 @@
+
+Index of all Connection Plugins
+===============================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_connection.rst>`_ -- Foo connection \ :literal:`bar` (of connection plugin `ns2.col.foo <foo_connection.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_filter.rst b/tests/functional/baseline-simplified-rst/collections/index_filter.rst
new file mode 100644
index 00000000..3e0c5e2c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_filter.rst
@@ -0,0 +1,10 @@
+
+Index of all Filter Plugins
+===========================
+
+ns2.col
+-------
+
+* `ns2.col.bar <ns2/col/bar_filter.rst>`_ -- The bar filter
+* `ns2.col.foo <ns2/col/foo_filter.rst>`_ -- The foo filter \ :literal:`bar` (of filter plugin `ns2.col.foo <foo_filter.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_inventory.rst b/tests/functional/baseline-simplified-rst/collections/index_inventory.rst
new file mode 100644
index 00000000..a7581272
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_inventory.rst
@@ -0,0 +1,9 @@
+
+Index of all Inventory Plugins
+==============================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_inventory.rst>`_ -- The foo inventory \ :literal:`bar` (of inventory plugin `ns2.col.foo <foo_inventory.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_lookup.rst b/tests/functional/baseline-simplified-rst/collections/index_lookup.rst
new file mode 100644
index 00000000..04b1f685
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_lookup.rst
@@ -0,0 +1,9 @@
+
+Index of all Lookup Plugins
+===========================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_lookup.rst>`_ -- Look up some foo \ :literal:`bar` (of lookup plugin `ns2.col.foo <foo_lookup.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_module.rst b/tests/functional/baseline-simplified-rst/collections/index_module.rst
new file mode 100644
index 00000000..19f7f1b1
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_module.rst
@@ -0,0 +1,25 @@
+
+Index of all Modules
+====================
+
+ns.col2
+-------
+
+* `ns.col2.foo <ns/col2/foo_module.rst>`_ -- 
+* `ns.col2.foo2 <ns/col2/foo2_module.rst>`_ -- Foo two
+* `ns.col2.foo3 <ns/col2/foo3_module.rst>`_ -- Foo III
+* `ns.col2.foo4 <ns/col2/foo4_module.rst>`_ -- Markup reference linting test
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_module.rst>`_ -- Do some foo \ :literal:`bar` (of module `ns2.col.foo <foo_module.rst>`__)\ 
+* `ns2.col.foo2 <ns2/col/foo2_module.rst>`_ -- Another foo
+* `ns2.col.sub.foo3 <ns2/col/sub.foo3_module.rst>`_ -- A sub-foo
+
+ns2.flatcol
+-----------
+
+* `ns2.flatcol.foo <ns2/flatcol/foo_module.rst>`_ -- Do some foo \ :literal:`bar` (of module `ns2.flatcol.foo <foo_module.rst>`__)\ 
+* `ns2.flatcol.foo2 <ns2/flatcol/foo2_module.rst>`_ -- Another foo
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_role.rst b/tests/functional/baseline-simplified-rst/collections/index_role.rst
new file mode 100644
index 00000000..79c5768a
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_role.rst
@@ -0,0 +1,14 @@
+
+Index of all Roles
+==================
+
+ns.col2
+-------
+
+* `ns.col2.bar <ns/col2/bar_role.rst>`_ -- Bar role
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_role.rst>`_ -- Foo role
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_shell.rst b/tests/functional/baseline-simplified-rst/collections/index_shell.rst
new file mode 100644
index 00000000..31e28963
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_shell.rst
@@ -0,0 +1,9 @@
+
+Index of all Shell Plugins
+==========================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_shell.rst>`_ -- Foo shell \ :literal:`bar` (of shell plugin `ns2.col.foo <foo_shell.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_strategy.rst b/tests/functional/baseline-simplified-rst/collections/index_strategy.rst
new file mode 100644
index 00000000..e397e913
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_strategy.rst
@@ -0,0 +1,9 @@
+
+Index of all Strategy Plugins
+=============================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_strategy.rst>`_ -- Executes tasks in foo
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_test.rst b/tests/functional/baseline-simplified-rst/collections/index_test.rst
new file mode 100644
index 00000000..8d13138c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_test.rst
@@ -0,0 +1,10 @@
+
+Index of all Test Plugins
+=========================
+
+ns2.col
+-------
+
+* `ns2.col.bar <ns2/col/bar_test.rst>`_ -- Is something a bar
+* `ns2.col.foo <ns2/col/foo_test.rst>`_ -- Is something a foo \ :literal:`bar` (of test plugin `ns2.col.foo <foo_test.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/index_vars.rst b/tests/functional/baseline-simplified-rst/collections/index_vars.rst
new file mode 100644
index 00000000..0ea2ac44
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/index_vars.rst
@@ -0,0 +1,9 @@
+
+Index of all Vars Plugins
+=========================
+
+ns2.col
+-------
+
+* `ns2.col.foo <ns2/col/foo_vars.rst>`_ -- Load foo \ :literal:`bar` (of vars plugin `ns2.col.foo <foo_vars.rst>`__)\ 
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col1/index.rst b/tests/functional/baseline-simplified-rst/collections/ns/col1/index.rst
new file mode 100644
index 00000000..0d2a22c8
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col1/index.rst
@@ -0,0 +1,32 @@
+
+
+Ns.Col1
+=======
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+Description
+-----------
+
+A short description.
+
+**Authors:**
+
+* Ansible (https://github.com/ansible)
+* Foo Bar (@ansible)
+* Test <foo@example.com>
+
+
+
+
+
+
+Plugin Index
+------------
+
+There are no plugins in the ns.col1 collection with automatically generated documentation.
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/bar_role.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/bar_role.rst
new file mode 100644
index 00000000..848b93fe
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/bar_role.rst
@@ -0,0 +1,67 @@
+
+
+ns.col2.bar role -- Bar role
+++++++++++++++++++++++++++++
+
+This role is part of the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_ (version 0.0.1).
+
+To install it use: :code:`ansible-galaxy collection install ns.col2`.
+
+To use it in a playbook, specify: :code:`ns.col2.bar`.
+
+.. contents::
+   :local:
+   :depth: 2
+
+
+Entry point ``baz`` -- Bar role, baz entrypoint
+-----------------------------------------------
+
+
+
+Synopsis
+^^^^^^^^
+
+- This is the baz entrypoint of the bar role.
+
+
+
+
+
+
+
+
+Entry point ``main`` -- Bar role
+--------------------------------
+
+
+
+Synopsis
+^^^^^^^^
+
+- This is the bar role.
+
+
+
+
+
+See Also
+^^^^^^^^
+
+* \ `ns2.col.foo <foo_module.rst>`__\ 
+
+  The official documentation on the **ns2.col.foo** module.
+* \ `ns2.col.foobarbaz <foobarbaz_module.rst>`__\ 
+
+  The official documentation on the **ns2.col.foobarbaz** module.
+
+Authors
+^^^^^^^
+
+- Felix Fontein (@felixfontein)
+
+
+
+.. Extra links
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/foo2_module.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo2_module.rst
new file mode 100644
index 00000000..b6ffcd5c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo2_module.rst
@@ -0,0 +1,278 @@
+
+
+ns.col2.foo2 module -- Foo two
+++++++++++++++++++++++++++++++
+
+This module is part of the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_ (version 0.0.1).
+
+To install it, use: :code:`ansible-galaxy collection install ns.col2`.
+You need further requirements to be able to use this module,
+see `Requirements <ansible_collections.ns.col2.foo2_module_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns.col2.foo2`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Does some foo on the remote host.
+- A broken reference \ :ref:`asdfasdfoobarTHISDOESNOTEXIST <asdfasdfoobarTHISDOESNOTEXIST>`\ .
+- The option \ :literal:`foo` (`link <parameter-foo_>`_)\  exists, but \ :literal:`foobar` (`link <parameter-foobar_>`_)\  does not.
+- The return value \ :literal:`bar` (`link <return-bar_>`_)\  exists, but \ :literal:`barbaz` (`link <return-barbaz_>`_)\  does not.
+- Again existing: \ :literal:`foo=1` (of module `ns.col2.foo <foo_module.rst>`__)\ , \ :literal:`bar=2` (of module `ns.col2.foo <foo_module.rst>`__)\ 
+- Again not existing: \ :literal:`foobar=1` (of module `ns.col2.foo <foo_module.rst>`__)\ , \ :literal:`barbaz=2` (of module `ns.col2.foo <foo_module.rst>`__)\ 
+
+
+
+.. _ansible_collections.ns.col2.foo2_module_requirements:
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- Foo.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th colspan="2"><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Bar.</p>
+      <p>Some <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-broken%2520markup"><span class="std std-ref"><span class="pre">broken markup</span></span></a></strong></code>.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The foo source.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo"></div>
+      <p style="display: inline;"><strong>subfoo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some recursive foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/BaZ"></div>
+      <p style="display: inline;"><strong>BaZ</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/BaZ" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Funky.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A sub foo.</p>
+      <p>Whatever.</p>
+      <p>Also required when <em>subfoo</em> is specified when <em>foo=bar</em> or <code class='docutils literal notranslate'>baz</code>.</p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-foobarbaz"><span class="std std-ref"><span class="pre">foobarbaz</span></span></a></code> does not exist.</p>
+    </td>
+  </tr>
+
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns.col2.foo2_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns.col2.foo2_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns.col2.foo2_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+      The module \ :strong:`ERROR while parsing`\ : While parsing "M(boo)" at index 12: Module name "boo" is not a FQCN\  is not using an FQCN.
+
+      Sometimes our markup is \ :strong:`ERROR while parsing`\ : While parsing "B(broken." at index 25: Cannot find closing ")" after last parameter\ 
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+See Also
+--------
+
+* \ `ns.col2.foo3 <foo3_module.rst>`__\ 
+
+  Foo III.
+* \ `ns.col2.foobarbaz <foobarbaz_module.rst>`__\ 
+
+  The official documentation on the **ns.col2.foobarbaz** module.
+* \ `ns.col2.foo4 <foo4_module.rst>`__\  module plugin
+
+  Markup reference linting test.
+* \ `ns.col2.foobarbaz <foobarbaz_inventory.rst>`__\  inventory plugin
+
+  The official documentation on the **ns.col2.foobarbaz** inventory plugin.
+* \ `ansible.builtin.service <service_module.rst>`__\ 
+
+  The service module.
+* \ `ansible.builtin.foobarbaz <foobarbaz_module.rst>`__\ 
+
+  A non-existing module.
+* \ `ansible.builtin.linear <linear_strategy.rst>`__\  strategy plugin
+
+  The linear strategy plugin.
+* \ `ansible.builtin.foobarbaz <foobarbaz_strategy.rst>`__\  strategy plugin
+
+  A non-existing stragey plugin
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    name: This is YAML.
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Someone else (@ansible)
+
+
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/foo3_module.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo3_module.rst
new file mode 100644
index 00000000..92183ce6
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo3_module.rst
@@ -0,0 +1,205 @@
+
+
+ns.col2.foo3 module -- Foo III
+++++++++++++++++++++++++++++++
+
+This module is part of the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_ (version 0.0.1).
+
+To install it, use: :code:`ansible-galaxy collection install ns.col2`.
+You need further requirements to be able to use this module,
+see `Requirements <ansible_collections.ns.col2.foo3_module_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns.col2.foo3`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Does some foo on the remote host.
+
+
+
+.. _ansible_collections.ns.col2.foo3_module_requirements:
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- Foo.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th colspan="2"><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The foo source.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo"></div>
+      <p style="display: inline;"><strong>subfoo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some recursive foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A sub foo.</p>
+      <p>Whatever.</p>
+      <p>Also required when <em>subfoo</em> is specified when <em>foo=bar</em> or <code class='docutils literal notranslate'>baz</code>.</p>
+    </td>
+  </tr>
+
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns.col2.foo3_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns.col2.foo3_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns.col2.foo3_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    This is not YAML.
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Someone else (@ansible)
+
+
+
+
+There were some errors parsing the documentation for this plugin.  Please file a bug with the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_.
+
+The errors were:
+
+* ::
+
+        Unable to normalize foo3: return due to: 2 validation errors for PluginReturnSchema
+        return -> bar -> type
+          string does not match regex "^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|complex|dict|float|int|json|jsonarg|list|path|sid|str|pathspec|pathlist)$)
+        return -> baz
+          value is not a valid dict (type=type_error.dict)
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/foo4_module.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo4_module.rst
new file mode 100644
index 00000000..fd3808d3
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo4_module.rst
@@ -0,0 +1,174 @@
+
+
+ns.col2.foo4 module -- Markup reference linting test
+++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_ (version 0.0.1).
+
+To install it, use: :code:`ansible-galaxy collection install ns.col2`.
+
+To use it in a playbook, specify: :code:`ns.col2.foo4`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-correct_array_stubs"></div>
+      <p style="display: inline;"><strong>correct_array_stubs</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-correct_array_stubs" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ansible/builtin/iptables_module.html#parameter-tcp_flags/flags"><span class="std std-ref"><span class="pre">tcp_flags.flags[]</span></span></a></strong></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/bar_filter.html#parameter-foo"><span class="std std-ref"><span class="pre">foo</span></span></a></strong></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/bar_filter.html#parameter-foo"><span class="std std-ref"><span class="pre">foo[]</span></span></a></strong></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/foo_module.html#parameter-foo/bar"><span class="std std-ref"><span class="pre">foo[baz].bar</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ext/col/foo_module.html#return-baz"><span class="std std-ref"><span class="pre">baz</span></span></a></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ext/col/foo_module.html#return-baz"><span class="std std-ref"><span class="pre">baz[ ]</span></span></a></code></p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-existing"></div>
+      <p style="display: inline;"><strong>existing</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-existing" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p><a href='../../ansible/builtin/service_module.html' class='module'>ansible.builtin.service</a></p>
+      <p><a href='../../ansible/builtin/pipe_lookup.html' class='module'>ansible.builtin.pipe</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ansible/builtin/file_module.html#parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ansible/builtin/stat_module.html#return-stat/exists"><span class="std std-ref"><span class="pre">stat.exists</span></span></a></code></p>
+      <p><a href='../../ns2/flatcol/foo_module.html' class='module'>ns2.flatcol.foo</a></p>
+      <p><a href='../../ns2/flatcol/sub.foo2_module.html' class='module'>ns2.flatcol.sub.foo2</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/flatcol/foo_module.html#parameter-subbaz/bam"><span class="std std-ref"><span class="pre">subbaz.bam</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/flatcol/sub.foo2_module.html#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code></p>
+      <p><a href='../../ns2/col/foo2_module.html' class='module'>ns2.col.foo2</a></p>
+      <p><a href='../../ns2/col/foo_lookup.html' class='module'>ns2.col.foo</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/bar_filter.html#parameter-foo"><span class="std std-ref"><span class="pre">foo[-1]</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/col/bar_test.html#return-_value"><span class="std std-ref"><span class="pre">_value</span></span></a></code></p>
+      <p><a href='../../ns/col2/foo2_module.html' class='module'>ns.col2.foo2</a></p>
+      <p><a href='../../ns/col2/foo2_module.html' class='module'>ns.col2.foo2</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns/col2/foo2_module.html#parameter-subfoo/foo"><span class="std std-ref"><span class="pre">subfoo.foo</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns/col2/foo2_module.html#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code></p>
+      <p><a href='../../ext/col/foo_module.html' class='module'>ext.col.foo</a></p>
+      <p><a href='../../ext/col/bar_lookup.html' class='module'>ext.col.bar</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/foo_module.html#parameter-foo/bar"><span class="std std-ref"><span class="pre">foo[len(foo)].bar</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ext/col/foo_module.html#return-baz"><span class="std std-ref"><span class="pre">baz[]</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns/col2/foo2_module.html#parameter-subfoo/BaZ"><span class="std std-ref"><span class="pre">subfoo.BaZ</span></span></a></strong></code></p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-incorrect_array_stubs"></div>
+      <p style="display: inline;"><strong>incorrect_array_stubs</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-incorrect_array_stubs" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ansible/builtin/file_module.html#parameter-state"><span class="std std-ref"><span class="pre">state[]</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ansible/builtin/stat_module.html#return-stat/exists"><span class="std std-ref"><span class="pre">stat[foo.bar].exists</span></span></a></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ansible/builtin/stat_module.html#return-stat/exists"><span class="std std-ref"><span class="pre">stat.exists[]</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns/col2/foo2_module.html#parameter-subfoo%255B"><span class="std std-ref"><span class="pre">subfoo[</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns/col2/foo2_module.html#return-bar"><span class="std std-ref"><span class="pre">bar[]</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/foo_module.html#parameter-foo/bar"><span class="std std-ref"><span class="pre">foo.bar</span></span></a></strong></code></p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-not_existing"></div>
+      <p style="display: inline;"><strong>not_existing</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-not_existing" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p><a href='../../ansible/builtin/foobar_module.html' class='module'>ansible.builtin.foobar</a></p>
+      <p><a href='../../ansible/builtin/bazbam_lookup.html' class='module'>ansible.builtin.bazbam</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ansible/builtin/file_module.html#parameter-foobarbaz"><span class="std std-ref"><span class="pre">foobarbaz</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ansible/builtin/stat_module.html#return-baz/bam"><span class="std std-ref"><span class="pre">baz.bam[]</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ansible/builtin/foobar_module.html#parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ansible/builtin/bazbam_module.html#return-stat/exists"><span class="std std-ref"><span class="pre">stat.exists</span></span></a></code></p>
+      <p><a href='../../ns2/flatcol/foobarbaz_module.html' class='module'>ns2.flatcol.foobarbaz</a></p>
+      <p><a href='../../ns2/flatcol/sub.bazbam_module.html' class='module'>ns2.flatcol.sub.bazbam</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/flatcol/foo_module.html#parameter-foofoofoobar"><span class="std std-ref"><span class="pre">foofoofoobar</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/flatcol/sub.foo2_module.html#return-bazbarbam"><span class="std std-ref"><span class="pre">bazbarbam</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/flatcol/foobar_module.html#parameter-subbaz/bam"><span class="std std-ref"><span class="pre">subbaz.bam</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/flatcol/sub.bazbam_module.html#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code></p>
+      <p><a href='../../ns2/col/joo_module.html' class='module'>ns2.col.joo</a></p>
+      <p><a href='../../ns2/col/joo_lookup.html' class='module'>ns2.col.joo</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/bar_filter.html#parameter-jooo"><span class="std std-ref"><span class="pre">jooo</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/col/bar_test.html#return-booo"><span class="std std-ref"><span class="pre">booo</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/joo_filter.html#parameter-foo"><span class="std std-ref"><span class="pre">foo[-1]</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns2/col/joo_test.html#return-_value"><span class="std std-ref"><span class="pre">_value</span></span></a></code></p>
+      <p><a href='../../ns/col2/foobarbaz_module.html' class='module'>ns.col2.foobarbaz</a></p>
+      <p><a href='../../ns/col2/foobarbam_filter.html' class='module'>ns.col2.foobarbam</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns/col2/foo2_module.html#parameter-barbazbam/foo"><span class="std std-ref"><span class="pre">barbazbam.foo</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns/col2/foo2_module.html#return-bambazbar"><span class="std std-ref"><span class="pre">bambazbar</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns/col2/foofoo_test.html#parameter-subfoo/foo"><span class="std std-ref"><span class="pre">subfoo.foo</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ns/col2/foofoo_lookup.html#return-baz"><span class="std std-ref"><span class="pre">baz</span></span></a></code></p>
+      <p><a href='../../ext/col/notthere_module.html' class='module'>ext.col.notthere</a></p>
+      <p><a href='../../ext/col/notthere_lookup.html' class='module'>ext.col.notthere</a></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/foo_module.html#parameter-foo/notthere"><span class="std std-ref"><span class="pre">foo[len(foo)].notthere</span></span></a></strong></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/foo_module.html#parameter-notthere/bar"><span class="std std-ref"><span class="pre">notthere[len(notthere)].bar</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ext/col/foo_module.html#return-notthere"><span class="std std-ref"><span class="pre">notthere[]</span></span></a></code></p>
+      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ext/col/notthere_module.html#parameter-foo/bar"><span class="std std-ref"><span class="pre">foo[len(foo)].bar</span></span></a></strong></code></p>
+      <p><code class="ansible-return-value literal notranslate"><a class="reference internal" href="../../ext/col/notthere_module.html#return-baz"><span class="std std-ref"><span class="pre">baz[]</span></span></a></code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Nobody (@ansible)
+
+
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/foo_module.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo_module.rst
new file mode 100644
index 00000000..27fe9f78
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/foo_module.rst
@@ -0,0 +1,26 @@
+
+ns.col2.foo module
+++++++++++++++++++
+
+The documentation for the module plugin, ns.col2.foo, was malformed.
+
+The errors were:
+
+* ::
+
+        6 validation errors for ModuleDocSchema
+        doc -> short_description
+          field required (type=value_error.missing)
+        doc -> seealso
+          value is not a valid list (type=type_error.list)
+        doc -> options -> bar -> description -> 0
+          str type expected (type=type_error.str)
+        doc -> options -> bar -> type
+          string does not match regex "^(any|bits|bool|bytes|dict|float|int|json|jsonarg|list|path|raw|sid|str|tmppath|pathspec|pathlist)$" (type=value_error.str.regex; pattern=^(any|bits|bool|bytes|dict|float|int|json|jsonarg|list|path|raw|sid|str|tmppath|pathspec|pathlist)$)
+        doc -> options -> foo
+          value is not a valid dict (type=type_error.dict)
+        doc -> options -> subfoo -> bam
+          extra fields not permitted (type=value_error.extra)
+
+
+File a bug with the `ns.col2 collection <https://galaxy.ansible.com/ns/col2>`_ in order to have it corrected.
\ No newline at end of file
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/col2/index.rst b/tests/functional/baseline-simplified-rst/collections/ns/col2/index.rst
new file mode 100644
index 00000000..3d1d4a84
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/col2/index.rst
@@ -0,0 +1,49 @@
+
+
+Ns.Col2
+=======
+
+Collection version 0.0.1
+
+.. contents::
+   :local:
+   :depth: 1
+
+Description
+-----------
+
+
+**Author:**
+
+* Ansible (https://github.com/ansible)
+
+**Supported ansible-core versions:**
+
+* newer than 2.11.0
+
+
+
+
+
+Plugin Index
+------------
+
+These are the plugins in the ns.col2 collection:
+
+
+Modules
+~~~~~~~
+
+* `foo module <foo_module.rst>`_ -- 
+* `foo2 module <foo2_module.rst>`_ -- Foo two
+* `foo3 module <foo3_module.rst>`_ -- Foo III
+* `foo4 module <foo4_module.rst>`_ -- Markup reference linting test
+
+
+Role Index
+----------
+
+These are the roles in the ns.col2 collection:
+
+* `bar role <bar_role.rst>`_ -- Bar role
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns/index.rst b/tests/functional/baseline-simplified-rst/collections/ns/index.rst
new file mode 100644
index 00000000..a9003cb4
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns/index.rst
@@ -0,0 +1,11 @@
+
+
+.. _list_of_collections_ns:
+
+Collections in the Ns Namespace
+===============================
+
+These are the collections documented here in the **ns** namespace.
+
+* `ns.col1 <namespace/index.rst>`_
+* `ns.col2 <namespace/index.rst>`_
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_filter.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_filter.rst
new file mode 100644
index 00000000..ff5b2e15
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_filter.rst
@@ -0,0 +1,245 @@
+
+
+ns2.col.bar filter -- The bar filter
+++++++++++++++++++++++++++++++++++++
+
+This filter plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.bar`.
+
+New in ns2.col 2.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Do some barring.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the filter, the value before ``| ns2.col.bar``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The main input.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Positional parameters
+---------------------
+
+This describes positional parameters of the filter. These are the values ``positional1``, ``positional2`` and so on in the following
+example: ``input | ns2.col.bar(positional1, positional2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>And some bar.</p>
+      <p style="margin-top: 8px;"><b">Choices:</b></p>
+      <ul>
+        <li><p><code style="color: blue;"><b>false</b></code> <span style="color: blue;">← (default)</span></p></li>
+        <li><p><code>true</code></p></li>
+      </ul>
+
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+example: ``input | ns2.col.bar(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-baz"></div>
+      <p style="display: inline;"><strong>baz</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-baz" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Something else.</p>
+      <p style="margin-top: 8px;"><b">Choices:</b></p>
+      <ul>
+        <li>
+          <p><code>&#34;a&#34;</code>:
+          Whatever <code class='docutils literal notranslate'>a</code> is.</p>
+        </li>
+        <li>
+          <p><code>&#34;b&#34;</code>:
+          What is <code class='docutils literal notranslate'>b</code>? I don&#x27;t know.</p>
+        </li>
+        <li>
+          <p><code>&#34;cde&#34;</code>:
+          This is some more unknown. There are rumors this is related to the alphabet.</p>
+        </li>
+        <li>
+          <p><code style="color: blue;"><b>&#34;foo&#34;</b></code> <span style="color: blue;">(default)</span>:
+          Our default value, the glorious <code class='docutils literal notranslate'>foo</code>.</p>
+          <p>Even has two paragraphs.</p>
+        </li>
+      </ul>
+
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
+  ``input | ns2.col.bar(positional1, positional2, key1=value1, key2=value2)``
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    {'a': 1} | ns2.col.bar({'b': 2}, baz='cde')
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The result.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_test.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_test.rst
new file mode 100644
index 00000000..be1d7c35
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/bar_test.rst
@@ -0,0 +1,130 @@
+
+
+ns2.col.bar test -- Is something a bar
+++++++++++++++++++++++++++++++++++++++
+
+This test plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.bar`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Check whether a path is a bar.
+
+
+Aliases: is_bar
+
+
+
+
+
+Input
+-----
+
+This describes the input of the test, the value before ``is ns2.col.bar`` or ``is not ns2.col.bar``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">path</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>A path.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    is_path_bar: "{{ '/etc/hosts' is ns2.col.bar }}}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Returns <code class='docutils literal notranslate'>true</code> if the path is a bar, <code class='docutils literal notranslate'>false</code> if it is not a bar.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/docsite/filter_guide.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/docsite/filter_guide.rst
new file mode 100644
index 00000000..0354846d
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/docsite/filter_guide.rst
@@ -0,0 +1,30 @@
+..
+  Copyright (c) Ansible Project
+  GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+  SPDX-License-Identifier: GPL-3.0-or-later
+
+.. _ansible_collections.ns2.col.docsite.filter_guide:
+
+Filter Guide
+============
+
+.. contents:: Contents
+   :local:
+   :depth: 1
+
+The :ref:`ns2.col collection <plugins_in_ns2.col>` offers two filters.
+
+- ``ns2.col.foo``: foo!
+- ``ns2.col.bar``: bar!
+
+.. envvar:: FOOBAR1
+
+    This is one environment variable.
+
+.. envvar:: FOOBAR2
+
+    This is another environment variable.
+
+.. envvar:: FOOBAR3
+
+    This is a third environment variable.
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo2_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo2_module.rst
new file mode 100644
index 00000000..fb6b043f
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo2_module.rst
@@ -0,0 +1,198 @@
+
+
+ns2.col.foo2 module -- Another foo
+++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo2`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Foo bar.
+- See \ :literal:`foo\_param\_1` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for a random role parameter reference. And \ :literal:`foo\_param\_2=42` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for one with a value.
+- Reference using alias - \ :literal:`bar` (of module `ns2.col.foo\_redirect <foo_redirect_module.rst>`__)\  and \ :literal:`baz` (of module `ns2.col.foo\_redirect <foo_redirect_module.rst>`__)\ .
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>See <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> for a random role parameter reference. And <code class="ansible-option-value literal notranslate"><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=42</span></span></a></code> for one with a value.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action groups: \ns2.col.bar\_group, ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  or \ :literal:`group/ns2.col.bar\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: N/A
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.foo2_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.col.foo2:
+        bar: foo
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Another one (@ansible-community)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_become.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_become.rst
new file mode 100644
index 00000000..e0389a76
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_become.rst
@@ -0,0 +1,225 @@
+
+
+ns2.col.foo become -- Use foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This become plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+DEPRECATED
+----------
+:Removed in: version 5.0.0
+:Why: Just some text.
+      This one has more than one line.
+      And one more.
+
+:Alternative: I don't know
+              of any
+              alternative.
+
+
+Synopsis
+--------
+
+- This become plugin uses foo.
+- This is a second paragraph.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 1.2.0</i></p>
+  <p>Removed in: version 4.0.0</p>
+  <p>Why: Just some other text.
+  This one has more than one line though.
+  One more.
+  </p>
+  <p>Alternative: nothing
+  relevant
+  I know of
+  </p>
+
+    </td>
+    <td valign="top">
+      <p>Bar. <b>BAR!</b></p>
+      <p>Totally unrelated to <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user</span></span></a></strong></code>. Even with <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user=foo</span></span></a></code>.</p>
+      <p>Might not be compatible when <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-become_user"><span class="std std-ref"><span class="pre">become_user</span></span></a></strong></code> is <code class="ansible-value literal notranslate">bar</code>, though.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-become_exe"></div>
+      <p style="display: inline;"><strong>become_exe</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-become_exe" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.2.0</i></p>
+
+    </td>
+    <td valign="top">
+      <p>Foo executable.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;foo&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entries</p>
+        <pre>[privilege_escalation]
+  become_exe = foo</pre>
+
+        <pre>[foo_become_plugin]
+  executable = foo</pre>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_BECOME_EXE</code></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_EXE</code></p>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_become_exe</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_foo_exe</p>
+  <p>Removed in: version 3.0.0</p>
+  <p>Why: Just some text.</p>
+  <p>Alternative: nothing</p>
+
+      </li>
+      <li>
+        <p>Keyword: become_exe</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-become_user"></div>
+      <p style="display: inline;"><strong>become_user</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-become_user" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>User you &#x27;become&#x27; to execute the task.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;root&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entries</p>
+        <pre>[privilege_escalation]
+  become_user = root</pre>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+        <pre>[foo_become_plugin]
+  user = root</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_BECOME_USER</code></p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_USER</code></p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_become_user</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_foo_user</p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      <li>
+        <p>Keyword: become_user</p>
+        <p><i style="font-size: small; color: darkgreen;">added in ns2.col 0.1.0</i></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+- This become will be removed in version 5.0.0.
+  *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Nobody 
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cache.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cache.rst
new file mode 100644
index 00000000..30d802ef
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cache.rst
@@ -0,0 +1,115 @@
+
+
+ns2.col.foo cache -- Foo files \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This cache plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.9.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Cache foo files.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_uri"></div>
+      <p style="display: inline;"><strong>_uri</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_uri" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">path</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Path in which the cache plugin will save the foo files.</p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  fact_caching_connection = VALUE</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_CACHE_PLUGIN_CONNECTION</code></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Nothing.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core (@ansible-core)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_callback.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_callback.rst
new file mode 100644
index 00000000..a2fa5115
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_callback.rst
@@ -0,0 +1,87 @@
+
+
+ns2.col.foo callback -- Foo output \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This callback plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.0.1
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Callback plugin
+---------------
+
+This plugin is a **stdout callback**. You can use only use one stdout callback at a time. Additional aggregate or notification callbacks can be enabled though.
+
+Synopsis
+--------
+
+- Absolut minimal foo output.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Nothing.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cliconf.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cliconf.rst
new file mode 100644
index 00000000..54bec27c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_cliconf.rst
@@ -0,0 +1,55 @@
+
+
+ns2.col.foo cliconf -- Foo router CLI config
+++++++++++++++++++++++++++++++++++++++++++++
+
+This cliconf plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is a CLI config for foo routers. Whatever these are.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Felix Fontein (@felixfontein) 
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_connection.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_connection.rst
new file mode 100644
index 00000000..59c149df
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_connection.rst
@@ -0,0 +1,130 @@
+
+
+ns2.col.foo connection -- Foo connection \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This connection plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.2.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is for the \ :literal:`foo`\  connection.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">integer</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-host"></div>
+      <p style="display: inline;"><strong>host</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-host" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Hostname to connect to.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;inventory_hostname&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>Variable: inventory_hostname</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_host</p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_ssh_host</p>
+
+      </li>
+      <li>
+        <p>Variable: delegated_vars[&#39;ansible_host&#39;]</p>
+
+      </li>
+      <li>
+        <p>Variable: delegated_vars[&#39;ansible_ssh_host&#39;]</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- Some note. \ :strong:`Something in bold`\ . \ :literal:`And in code`\ . \ :emphasis:`And in italics`\ . An URL: \ https://example.org\ .
+- And another one. \ `A link <https://example.com>`__\ .
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- ansible (@core)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_filter.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_filter.rst
new file mode 100644
index 00000000..d0ef824c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_filter.rst
@@ -0,0 +1,177 @@
+
+
+ns2.col.foo filter -- The foo filter \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This filter plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.3.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Do some fooing.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the filter, the value before ``| ns2.col.foo``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The main input.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the filter. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+example: ``input | ns2.col.foo(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Some foo.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    some_var: "{{ 'foo' | ns2.col.foo }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The result.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_inventory.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_inventory.rst
new file mode 100644
index 00000000..1fa1e5c1
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_inventory.rst
@@ -0,0 +1,92 @@
+
+
+ns2.col.foo inventory -- The foo inventory \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This inventory plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.5.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Loads inventory from foo.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    foo:
+        bar!
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_lookup.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_lookup.rst
new file mode 100644
index 00000000..2febbc63
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_lookup.rst
@@ -0,0 +1,174 @@
+
+
+ns2.col.foo lookup -- Look up some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This lookup plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This looks up some foo.
+- Whatever that is.
+
+
+
+
+
+
+Terms
+-----
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_terms"></div>
+      <p style="display: inline;"><strong>Terms</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_terms" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>The stuff to look up.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the lookup. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+examples: ``lookup('ns2.col.foo', key1=value1, key2=value2, ...)`` and ``query('ns2.col.foo', key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Notes
+-----
+
+- When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
+  ``lookup('ns2.col.foo', term1, term2, key1=value1, key2=value2)`` and ``query('ns2.col.foo', term1, term2, key1=value1, key2=value2)``
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Look up bar
+      ansible.builtin.debug:
+        msg: "{{ lookup('ns2.col.foo', 'bar') }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_raw"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_raw" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The resulting stuff.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Felix Fontein (@felixfontein)
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_module.rst
new file mode 100644
index 00000000..692ecf2e
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_module.rst
@@ -0,0 +1,282 @@
+
+
+ns2.col.foo module -- Do some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+You need further requirements to be able to use this module,
+see `Requirements <ansible_collections.ns2.col.foo_module_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 2.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Does some foo on the remote host.
+- Whether foo is magic or not has not yet been determined.
+- \ :literal:`FOOBAR1`\ , \ :literal:`FOOBAR2`\ , \ :literal:`FOOBAR3`\ , \ :literal:`FOOBAR4`\ .
+
+
+Aliases: foo_redirect
+
+.. _ansible_collections.ns2.col.foo_module_requirements:
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- Foo on remote.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th colspan="2"><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <div class="ansibleOptionAnchor" id="parameter-baz"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: baz</span></p>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A bar.</p>
+      <p>Independent from <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo</span></span></a></strong></code>.</p>
+      <p>Do not confuse with <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The foo source.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo"></div>
+      <p style="display: inline;"><strong>subfoo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.col 2.0.0</i></p>
+    </td>
+    <td valign="top">
+      <p>Some recursive foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A sub foo.</p>
+      <p>Whatever.</p>
+      <p>Also required when <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subfoo"><span class="std std-ref"><span class="pre">subfoo</span></span></a></strong></code> is specified when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo=bar</span></span></a></code> or <code class="ansible-value literal notranslate">baz</code>.</p>
+    </td>
+  </tr>
+
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action group: \ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.foo_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+See Also
+--------
+
+* \ `ns2.col.foo2 <foo2_module.rst>`__\ 
+
+  Another foo.
+* \ `ns2.col.foo <foo_lookup.rst>`__\  lookup plugin
+
+  Look up some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ .
+* \ `ansible.builtin.service <service_module.rst>`__\ 
+
+  The service module.
+* \ `ansible.builtin.ssh <ssh_connection.rst>`__\  connection plugin
+
+  The ssh connection plugin.
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.col.foo:
+        foo: '{{ foo }}'
+        bar:
+          - 1
+          - 2
+          - 3
+        subfoo:
+          foo: hoo!
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core Team
+- Someone else (@ansible)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_redirect_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_redirect_module.rst
new file mode 100644
index 00000000..4b7c358c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_redirect_module.rst
@@ -0,0 +1,10 @@
+
+ns2.col.foo_redirect module
++++++++++++++++++++++++++++
+
+- This redirect is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+  To use it in a playbook, specify: :code:`ns2.col.foo_redirect`.
+
+- This is a redirect to the ns2.col.foo module.
+- This redirect does **not** work with Ansible 2.9.
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_role.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_role.rst
new file mode 100644
index 00000000..cfae9a83
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_role.rst
@@ -0,0 +1,140 @@
+
+
+ns2.col.foo role -- Foo role
+++++++++++++++++++++++++++++
+
+This role is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+.. contents::
+   :local:
+   :depth: 2
+
+
+Entry point ``main`` -- Foo role
+--------------------------------
+
+New in ns2.col 0.2.0
+
+DEPRECATED
+^^^^^^^^^^
+:Removed in: version 5.0.0
+:Why: Just some text.
+      This one has more than one line.
+      And one more.
+
+:Alternative: I don't know
+              of any
+              alternative.
+
+
+Synopsis
+^^^^^^^^
+
+- This is the foo role.
+- If you set \ :literal:`foo\_param\_1` (`link <parameter-main__foo_param_1_>`_)\  while \ :literal:`foo\_param\_2=3` (`link <parameter-main__foo_param_2_>`_)\ , this might behave funny.
+
+
+Parameters
+^^^^^^^^^^
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-main--foo_param_1"></div>
+      <p style="display: inline;"><strong>foo_param_1</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-main--foo_param_1" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>A string parameter</p>
+      <p>If you set <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> while <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=3</span></span></a></code>, this might behave funny.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-main--foo_param_2"></div>
+      <p style="display: inline;"><strong>foo_param_2</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-main--foo_param_2" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">integer</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>An integer parameter with a default.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">13</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.foo_role__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+
+
+See Also
+^^^^^^^^
+
+* \ `ns2.col.foo <foo_module.rst>`__\ 
+
+  The official documentation on the **ns2.col.foo** module.
+
+Authors
+^^^^^^^
+
+- Felix Fontein (@felixfontein)
+
+
+
+.. Extra links
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_shell.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_shell.rst
new file mode 100644
index 00000000..1e534045
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_shell.rst
@@ -0,0 +1,119 @@
+
+
+ns2.col.foo shell -- Foo shell \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This shell plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is for the foo shell.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-remote_tmp"></div>
+      <p style="display: inline;"><strong>remote_tmp</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-remote_tmp" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ansible-base 2.10</i></p>
+
+    </td>
+    <td valign="top">
+      <p>Temporary directory to use on targets when executing tasks.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">&#34;~/.ansible/tmp&#34;</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  remote_tmp = ~/.ansible/tmp</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_REMOTE_TEMP</code></p>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_REMOTE_TMP</code></p>
+
+      </li>
+      <li>
+        <p>Variable: ansible_remote_tmp</p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_strategy.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_strategy.rst
new file mode 100644
index 00000000..0fc060c0
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_strategy.rst
@@ -0,0 +1,56 @@
+
+
+ns2.col.foo strategy -- Executes tasks in foo
++++++++++++++++++++++++++++++++++++++++++++++
+
+This strategy plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 1.1.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- This is something funny. Or at least I think so from its name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core Team
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_test.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_test.rst
new file mode 100644
index 00000000..f1258e10
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_test.rst
@@ -0,0 +1,165 @@
+
+
+ns2.col.foo test -- Is something a foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This test plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Check whether the input dictionary is a foo.
+
+
+
+
+
+
+
+Input
+-----
+
+This describes the input of the test, the value before ``is ns2.col.foo`` or ``is not ns2.col.foo``.
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_input"></div>
+      <p style="display: inline;"><strong>Input</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_input" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+        / <span style="color: red;">required</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Something to test.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+Keyword parameters
+------------------
+
+This describes keyword parameters of the test. These are the values ``key1=value1``, ``key2=value2`` and so on in the following
+examples: ``input is ns2.col.foo(key1=value1, key2=value2, ...)`` and ``input is not ns2.col.foo(key1=value1, key2=value2, ...)``
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    some_var: "{{ {'a': 1} is ns2.col.foo }}"
+
+
+
+
+
+Return Value
+------------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-_value"></div>
+      <p style="display: inline;"><strong>Return value</strong></p>
+      <a class="ansibleOptionLink" href="#return-_value" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">boolean</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Whether the input is a foo.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Nobody
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_vars.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_vars.rst
new file mode 100644
index 00000000..d497cec4
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/foo_vars.rst
@@ -0,0 +1,122 @@
+
+
+ns2.col.foo vars -- Load foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This vars plugin is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+You need further requirements to be able to use this vars plugin,
+see `Requirements <ansible_collections.ns2.col.foo_vars_requirements_>`_ for details.
+
+To use it in a playbook, specify: :code:`ns2.col.foo`.
+
+New in ns2.col 0.9.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Load some foo.
+- This is so glorious.
+
+
+
+.. _ansible_collections.ns2.col.foo_vars_requirements:
+
+Requirements
+------------
+The below requirements are needed on the local controller node that executes this vars.
+
+- Enabled in Ansible's configuration.
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-_valid_extensions"></div>
+      <p style="display: inline;"><strong>_valid_extensions</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-_valid_extensions" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>All extensions to check.</p>
+      <p style="margin-top: 8px;"><b style="color: blue;">Default:</b> <code style="color: blue;">[&#34;.foo&#34;, &#34;.foobar&#34;]</code></p>
+      <p style="margin-top: 8px;"><b>Configuration:</b></p>
+      <ul>
+      <li>
+        <p>INI entry</p>
+        <pre>[defaults]
+  foo_valid_extensions = .foo, .foobar</pre>
+
+      </li>
+      <li>
+        <p>Environment variable: <code>ANSIBLE_FOO_FILENAME_EXT</code></p>
+
+      </li>
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+
+    </td>
+    <td valign="top">
+      <p>Foo bar.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+
+
+
+
+
+
+.. hint::
+    Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/index.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/index.rst
new file mode 100644
index 00000000..a67dc2f5
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/index.rst
@@ -0,0 +1,148 @@
+
+
+Ns2.Col
+=======
+
+Collection version 2.1.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+Description
+-----------
+
+This is a description.
+
+With multiple paragraphs.
+
+
+**Author:**
+
+* Ansible (https://github.com/ansible)
+
+**Supported ansible-core versions:**
+
+* 2.11.0 or newer
+* older than 2.99.0
+* version 2.12.2 is specifically not supported
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
+
+Communication
+-------------
+
+- Matrix room :literal:`#users:ansible.im`: `General usage and support questions <https://matrix.to/#/#users:ansible.im>`__.
+- IRC channel :literal:`#ansible` (Libera network):
+  `General usage and support questions <https://web.libera.chat/?channel=#ansible>`__.
+- Mailing list: `Ansible Project List <https://groups.google.com/g/ansible-project>`__.
+  (`Subscribe <mailto:ansible-project+subscribe@googlegroups.com?subject=subscribe>`__)
+
+Guides
+------
+
+* `<docsite/filter_guide.rst>`_
+
+
+Plugin Index
+------------
+
+These are the plugins in the ns2.col collection:
+
+
+Modules
+~~~~~~~
+
+* `foo module <foo_module.rst>`_ -- Do some foo \ :literal:`bar` (of module `ns2.col.foo <foo_module.rst>`__)\ 
+* `foo2 module <foo2_module.rst>`_ -- Another foo
+* `sub.foo3 module <sub.foo3_module.rst>`_ -- A sub-foo
+
+
+Become Plugins
+~~~~~~~~~~~~~~
+
+* `foo become <foo_become.rst>`_ -- Use foo \ :literal:`bar` (of become plugin `ns2.col.foo <foo_become.rst>`__)\ 
+
+
+Cache Plugins
+~~~~~~~~~~~~~
+
+* `foo cache <foo_cache.rst>`_ -- Foo files \ :literal:`bar` (of cache plugin `ns2.col.foo <foo_cache.rst>`__)\ 
+
+
+Callback Plugins
+~~~~~~~~~~~~~~~~
+
+* `foo callback <foo_callback.rst>`_ -- Foo output \ :literal:`bar` (of callback plugin `ns2.col.foo <foo_callback.rst>`__)\ 
+
+
+Cliconf Plugins
+~~~~~~~~~~~~~~~
+
+* `foo cliconf <foo_cliconf.rst>`_ -- Foo router CLI config
+
+
+Connection Plugins
+~~~~~~~~~~~~~~~~~~
+
+* `foo connection <foo_connection.rst>`_ -- Foo connection \ :literal:`bar` (of connection plugin `ns2.col.foo <foo_connection.rst>`__)\ 
+
+
+Filter Plugins
+~~~~~~~~~~~~~~
+
+* `bar filter <bar_filter.rst>`_ -- The bar filter
+* `foo filter <foo_filter.rst>`_ -- The foo filter \ :literal:`bar` (of filter plugin `ns2.col.foo <foo_filter.rst>`__)\ 
+
+
+Inventory Plugins
+~~~~~~~~~~~~~~~~~
+
+* `foo inventory <foo_inventory.rst>`_ -- The foo inventory \ :literal:`bar` (of inventory plugin `ns2.col.foo <foo_inventory.rst>`__)\ 
+
+
+Lookup Plugins
+~~~~~~~~~~~~~~
+
+* `foo lookup <foo_lookup.rst>`_ -- Look up some foo \ :literal:`bar` (of lookup plugin `ns2.col.foo <foo_lookup.rst>`__)\ 
+
+
+Shell Plugins
+~~~~~~~~~~~~~
+
+* `foo shell <foo_shell.rst>`_ -- Foo shell \ :literal:`bar` (of shell plugin `ns2.col.foo <foo_shell.rst>`__)\ 
+
+
+Strategy Plugins
+~~~~~~~~~~~~~~~~
+
+* `foo strategy <foo_strategy.rst>`_ -- Executes tasks in foo
+
+
+Test Plugins
+~~~~~~~~~~~~
+
+* `bar test <bar_test.rst>`_ -- Is something a bar
+* `foo test <foo_test.rst>`_ -- Is something a foo \ :literal:`bar` (of test plugin `ns2.col.foo <foo_test.rst>`__)\ 
+
+
+Vars Plugins
+~~~~~~~~~~~~
+
+* `foo vars <foo_vars.rst>`_ -- Load foo \ :literal:`bar` (of vars plugin `ns2.col.foo <foo_vars.rst>`__)\ 
+
+
+Role Index
+----------
+
+These are the roles in the ns2.col collection:
+
+* `foo role <foo_role.rst>`_ -- Foo role
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/is_bar_test.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/is_bar_test.rst
new file mode 100644
index 00000000..9d4e54b0
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/is_bar_test.rst
@@ -0,0 +1,10 @@
+
+ns2.col.is_bar test
++++++++++++++++++++
+
+- This redirect is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+  To use it in a playbook, specify: :code:`ns2.col.is_bar`.
+
+- This is a redirect to the ns2.col.bar test plugin.
+- This redirect does **not** work with Ansible 2.9.
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/col/sub.foo3_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/col/sub.foo3_module.rst
new file mode 100644
index 00000000..334ef385
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/col/sub.foo3_module.rst
@@ -0,0 +1,197 @@
+
+
+ns2.col.sub.foo3 module -- A sub-foo
+++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.col collection <https://galaxy.ansible.com/ns2/col>`_ (version 2.1.0).
+
+To install it, use: :code:`ansible-galaxy collection install ns2.col`.
+
+To use it in a playbook, specify: :code:`ns2.col.sub.foo3`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Foo sub bar.
+- See \ :literal:`foo\_param\_1` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for a random role parameter reference. And \ :literal:`foo\_param\_2=42` (of role `ns2.col.foo <foo_role.rst>`__, entrypoint main)\  for one with a value.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>See <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> for a random role parameter reference. And <code class="ansible-option-value literal notranslate"><a class="reference internal" href="../../ns2/col/foo_role.html#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=42</span></span></a></code> for one with a value.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Attributes
+----------
+
+.. list-table::
+  :widths: auto
+  :header-rows: 1
+
+  * - Attribute
+    - Support
+    - Description
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-action_group:
+
+      **action_group**
+
+    - 
+      Action groups: \ns2.col.bar\_group, ns2.col.foo\_group
+
+
+    - 
+      Use \ :literal:`group/ns2.col.foo\_group`\  or \ :literal:`group/ns2.col.bar\_group`\  in \ :literal:`module\_defaults`\  to set defaults for this module.
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-check_mode:
+
+      **check_mode**
+
+    - 
+      Support: full
+
+
+
+    - 
+      Can run in check\_mode and return changed status prediction without modifying target
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-diff_mode:
+
+      **diff_mode**
+
+    - 
+      Support: N/A
+
+
+
+    - 
+      Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode
+
+
+
+  * - .. _ansible_collections.ns2.col.sub.foo3_module__attribute-platform:
+
+      **platform**
+
+    - 
+      Platform:posix
+
+
+    - 
+      Target OS/families that can be operated against
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foobar
+      ns2.col.sub.foo3:
+        bar: baz
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Another one (@ansible-community)
+
+
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+* `Issue Tracker <https://github.com/ansible-collections/community.general/issues>`__
+* `Homepage <https://github.com/ansible-collections/community.crypto>`__
+* `Repository (Sources) <https://github.com/ansible-collections/community.internal\_test\_tools>`__
+* `Submit a bug report <https://github.com/ansible-community/antsibull-docs/issues/new?assignees=&labels=&template=bug\_report.md>`__
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo2_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo2_module.rst
new file mode 100644
index 00000000..2b4a903c
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo2_module.rst
@@ -0,0 +1,124 @@
+
+
+ns2.flatcol.foo2 module -- Another foo
+++++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.flatcol collection <https://galaxy.ansible.com/ns2/flatcol>`_.
+
+To install it, use: :code:`ansible-galaxy collection install ns2.flatcol`.
+
+To use it in a playbook, specify: :code:`ns2.flatcol.foo2`.
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Foo bar.
+- See \ :literal:`foo\_param\_1` (of role `ns2.flatcol.foo <foo_role.rst>`__, entrypoint main)\  for a random role parameter reference. And \ :literal:`foo\_param\_2=42` (of role `ns2.flatcol.foo <foo_role.rst>`__, entrypoint main)\  for one with a value.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>See <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="../../ns2/flatcol/foo_role.html#parameter-main--foo_param_1"><span class="std std-ref"><span class="pre">foo_param_1</span></span></a></strong></code> for a random role parameter reference. And <code class="ansible-option-value literal notranslate"><a class="reference internal" href="../../ns2/flatcol/foo_role.html#parameter-main--foo_param_2"><span class="std std-ref"><span class="pre">foo_param_2=42</span></span></a></code> for one with a value.</p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.flatcol.foo2:
+        bar: foo
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Another one (@ansible-community)
+
+
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo_module.rst b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo_module.rst
new file mode 100644
index 00000000..e9fcb090
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/foo_module.rst
@@ -0,0 +1,190 @@
+
+
+ns2.flatcol.foo module -- Do some foo \ :literal:`bar` (`link <parameter-bar_>`_)\ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This module is part of the `ns2.flatcol collection <https://galaxy.ansible.com/ns2/flatcol>`_.
+
+To install it, use: :code:`ansible-galaxy collection install ns2.flatcol`.
+
+To use it in a playbook, specify: :code:`ns2.flatcol.foo`.
+
+New in ns2.flatcol 2.0.0
+
+.. contents::
+   :local:
+   :depth: 1
+
+
+Synopsis
+--------
+
+- Does some foo on the remote host.
+- Whether foo is magic or not has not yet been determined.
+
+
+
+
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th colspan="2"><p>Parameter</p></th>
+    <th><p>Comments</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-bar"></div>
+      <div class="ansibleOptionAnchor" id="parameter-baz"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-bar" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: baz</span></p>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">list</span>
+        / <span style="color: purple;">elements=integer</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A bar.</p>
+      <p>Independent from <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo</span></span></a></strong></code>.</p>
+      <p>Do not confuse with <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-foo"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>The foo source.</p>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo"></div>
+      <div class="ansibleOptionAnchor" id="parameter-subbaz"></div>
+      <p style="display: inline;"><strong>subfoo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: subbaz</span></p>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">dictionary</span>
+      </p>
+      <p><i style="font-size: small; color: darkgreen;">added in ns2.flatcol 2.0.0</i></p>
+    </td>
+    <td valign="top">
+      <p>Some recursive foo.</p>
+    </td>
+  </tr>
+  <tr>
+    <td></td>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/foo"></div>
+      <div class="ansibleOptionAnchor" id="parameter-subbaz/foo"></div>
+      <div class="ansibleOptionAnchor" id="parameter-subfoo/bam"></div>
+      <div class="ansibleOptionAnchor" id="parameter-subbaz/bam"></div>
+      <p style="display: inline;"><strong>foo</strong></p>
+      <a class="ansibleOptionLink" href="#parameter-subfoo/foo" title="Permalink to this option"></a>
+      <p style="font-size: small; margin-bottom: 0;"><span style="color: darkgreen; white-space: normal;">aliases: bam</span></p>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+        / <span style="color: red;">required</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>A sub foo.</p>
+      <p>Whatever.</p>
+      <p>Also required when <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subfoo"><span class="std std-ref"><span class="pre">subfoo</span></span></a></strong></code> is specified when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-foo"><span class="std std-ref"><span class="pre">foo=bar</span></span></a></code> or <code class="ansible-value literal notranslate">baz</code>.</p>
+      <p>Note that <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subfoo/foo"><span class="std std-ref"><span class="pre">subfoo.foo</span></span></a></strong></code> is the same as <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subbaz/foo"><span class="std std-ref"><span class="pre">subbaz.foo</span></span></a></strong></code>, <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subbaz/bam"><span class="std std-ref"><span class="pre">subbaz.bam</span></span></a></strong></code>, and <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-subfoo/bam"><span class="std std-ref"><span class="pre">subfoo.bam</span></span></a></strong></code>.</p>
+      <p><code class="xref std std-envvar literal notranslate">FOOBAR1</code>, <code class="xref std std-envvar literal notranslate">FOOBAR2</code>, <code class="xref std std-envvar literal notranslate">FOOBAR3</code>, <code class="xref std std-envvar literal notranslate">FOOBAR4</code>.</p>
+    </td>
+  </tr>
+
+  </tbody>
+  </table>
+
+
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+    
+    - name: Do some foo
+      ns2.flatcol.foo:
+        foo: '{{ foo }}'
+        bar:
+          - 1
+          - 2
+          - 3
+        subfoo:
+          foo: hoo!
+
+
+
+
+
+Return Values
+-------------
+The following are the fields unique to this module:
+
+.. raw:: html
+
+  <table style="width: 100%;">
+  <thead>
+    <tr>
+    <th><p>Key</p></th>
+    <th><p>Description</p></th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr>
+    <td valign="top">
+      <div class="ansibleOptionAnchor" id="return-bar"></div>
+      <p style="display: inline;"><strong>bar</strong></p>
+      <a class="ansibleOptionLink" href="#return-bar" title="Permalink to this return value"></a>
+      <p style="font-size: small; margin-bottom: 0;">
+        <span style="color: purple;">string</span>
+      </p>
+    </td>
+    <td valign="top">
+      <p>Some bar.</p>
+      <p>Referencing myself as <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></code>.</p>
+      <p>Do not confuse with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-bar"><span class="std std-ref"><span class="pre">bar</span></span></a></strong></code>.</p>
+      <p style="margin-top: 8px;"><b>Returned:</b> success</p>
+      <p style="margin-top: 8px; color: blue; word-wrap: break-word; word-break: break-all;"><b style="color: black;">Sample:</b> <code>&#34;baz&#34;</code></p>
+    </td>
+  </tr>
+  </tbody>
+  </table>
+
+
+
+
+Authors
+~~~~~~~
+
+- Ansible Core Team
+- Someone else (@ansible)
+
+
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/index.rst b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/index.rst
new file mode 100644
index 00000000..1d1de0e9
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/flatcol/index.rst
@@ -0,0 +1,36 @@
+
+
+Ns2.Flatcol
+===========
+
+
+.. contents::
+   :local:
+   :depth: 1
+
+Description
+-----------
+
+
+**Author:**
+
+* Ansible (https://github.com/ansible)
+
+
+
+
+
+
+Plugin Index
+------------
+
+These are the plugins in the ns2.flatcol collection:
+
+
+Modules
+~~~~~~~
+
+* `foo module <foo_module.rst>`_ -- Do some foo \ :literal:`bar` (of module `ns2.flatcol.foo <foo_module.rst>`__)\ 
+* `foo2 module <foo2_module.rst>`_ -- Another foo
+
+
diff --git a/tests/functional/baseline-simplified-rst/collections/ns2/index.rst b/tests/functional/baseline-simplified-rst/collections/ns2/index.rst
new file mode 100644
index 00000000..80db364d
--- /dev/null
+++ b/tests/functional/baseline-simplified-rst/collections/ns2/index.rst
@@ -0,0 +1,11 @@
+
+
+.. _list_of_collections_ns2:
+
+Collections in the Ns2 Namespace
+================================
+
+These are the collections documented here in the **ns2** namespace.
+
+* `ns2.col <namespace/index.rst>`_
+* `ns2.flatcol <namespace/index.rst>`_
diff --git a/tests/functional/baseline-sphinx-init-collections/build.sh b/tests/functional/baseline-sphinx-init-collections/build.sh
index e80dd7a7..e2545fad 100755
--- a/tests/functional/baseline-sphinx-init-collections/build.sh
+++ b/tests/functional/baseline-sphinx-init-collections/build.sh
@@ -15,6 +15,7 @@ chmod og-w temp-rst  # antsibull-docs wants that directory only readable by itse
 antsibull-docs \
     --config-file antsibull-docs.cfg \
     collection \
+    --output-format ansible-docsite \
     --dest-dir temp-rst \
     ns.col1 ns.col2 ns2.col
 
diff --git a/tests/functional/baseline-sphinx-init-config/build.sh b/tests/functional/baseline-sphinx-init-config/build.sh
index 1f6aa3a8..3cf3f779 100755
--- a/tests/functional/baseline-sphinx-init-config/build.sh
+++ b/tests/functional/baseline-sphinx-init-config/build.sh
@@ -17,6 +17,7 @@ antsibull-docs \
     collection \
     --fail-on-error \
     --squash-hierarchy \
+    --output-format ansible-docsite \
     --dest-dir temp-rst \
     ns.col1
 
diff --git a/tests/functional/baseline-sphinx-init-extra/build.sh b/tests/functional/baseline-sphinx-init-extra/build.sh
index 3184c643..ae1a1dce 100755
--- a/tests/functional/baseline-sphinx-init-extra/build.sh
+++ b/tests/functional/baseline-sphinx-init-extra/build.sh
@@ -15,6 +15,7 @@ chmod og-w temp-rst  # antsibull-docs wants that directory only readable by itse
 antsibull-docs \
     --config-file antsibull-docs.cfg \
     collection \
+    --output-format ansible-docsite \
     --dest-dir temp-rst \
     ns.col1
 
diff --git a/tests/functional/build-docs-baseline.sh b/tests/functional/build-docs-baseline.sh
index 9073f29d..16b1fdc9 100755
--- a/tests/functional/build-docs-baseline.sh
+++ b/tests/functional/build-docs-baseline.sh
@@ -44,6 +44,8 @@ make_docsite_baseline baseline-no-breadcrumbs ns.col1 ns.col2 ns2.col ns2.flatco
 make_docsite_baseline baseline-no-indexes ns.col1 ns2.col ns2.flatcol --fail-on-error --no-indexes
 make_docsite_baseline baseline-use-html-blobs ns2.col --fail-on-error --use-html-blobs
 make_docsite_baseline baseline-squash-hierarchy ns2.col --fail-on-error --squash-hierarchy
+make_docsite_baseline baseline-simplified-rst ns.col1 ns.col2 ns2.col ns2.flatcol --output-format simplified-rst
+make_docsite_baseline baseline-simplified-rst-squash-hierarchy ns2.col --fail-on-error --squash-hierarchy --output-format simplified-rst
 
 echo "Build ansible --version output cache"
 ANSIBLE_COLLECTIONS_PATHS= ANSIBLE_COLLECTIONS_PATH=collections/ ansible --version | sed -e "s|${PWD}/collections|<<<<<COLLECTIONS>>>>>|g" | sed -e "s|${HOME}|<<<<<HOME>>>>>|g" | sed -E "s|(ansible python module location = ).*|\\1<<<<<ANSIBLE>>>>>|g" > ansible-version.output
diff --git a/tests/functional/test_docs_baseline.py b/tests/functional/test_docs_baseline.py
index 8ee30262..77febf48 100644
--- a/tests/functional/test_docs_baseline.py
+++ b/tests/functional/test_docs_baseline.py
@@ -66,6 +66,31 @@
         ],
         "baseline-squash-hierarchy",
     ),
+    (
+        [
+            "collection",
+            "--use-current",
+            "ns.col1",
+            "ns.col2",
+            "ns2.col",
+            "ns2.flatcol",
+            "--output-format",
+            "simplified-rst",
+        ],
+        "baseline-simplified-rst",
+    ),
+    (
+        [
+            "collection",
+            "--use-current",
+            "ns2.col",
+            "--fail-on-error",
+            "--squash-hierarchy",
+            "--output-format",
+            "simplified-rst",
+        ],
+        "baseline-simplified-rst-squash-hierarchy",
+    ),
 ]
 
 
diff --git a/tests/units/markup/test_markup.py b/tests/units/markup/test_markup.py
index 443d9af8..8ab942f6 100644
--- a/tests/units/markup/test_markup.py
+++ b/tests/units/markup/test_markup.py
@@ -7,7 +7,11 @@
 import pytest
 
 from antsibull_docs.jinja2 import OutputFormat
-from antsibull_docs.markup.rstify import get_rst_formatter, rst_escape, rst_ify
+from antsibull_docs.markup.rstify import (
+    get_rst_formatter_link_provider,
+    rst_escape,
+    rst_ify,
+)
 
 RST_IFY_DATA = {
     # No substitutions
@@ -35,9 +39,17 @@
 
 @pytest.mark.parametrize("text, expected", RST_IFY_DATA.items())
 def test_rst_ify(text, expected):
-    formatter = get_rst_formatter(OutputFormat.ANSIBLE_DOCSITE)
+    formatter, link_provider = get_rst_formatter_link_provider(
+        OutputFormat.ANSIBLE_DOCSITE
+    )
     assert (
-        rst_ify(text, formatter, plugin_fqcn="foo.bar.baz", plugin_type="module")[0]
+        rst_ify(
+            text,
+            formatter,
+            plugin_fqcn="foo.bar.baz",
+            plugin_type="module",
+            link_provider=link_provider,
+        )[0]
         == expected
     )