Skip to main content

MkDocs Plugin that automatically generates pages for Ansible Collections.

Project description

MkDocs Ansible Collection

MkDocs Plugin that automatically generates documentation pages for Ansible Collections. Check out the showcase over on the project's documentation page!

Quick Start

  1. Add the mkdocs-ansible-collection package to your project's docs dependencies. It will also install ansible-core to manage collections and get the required metadata.

    pip install mkdocs-ansible-collection
    
  2. Install any needed collection(s) using ansible-galaxy collection install <names> or point ansible at the correct collection path.

  3. Enable the plugin in your project's mkdocs.yml file:

    plugins:
    - "ansible-collection":
        "collections":
            - fqcn: "collection.example"
    
  4. Add an anchor page to the nav section of your project's mkdocs.yml file:

    nav:
      # The anchor is named after the Collection FQCN and it tells mkdocs where
      # to generate the documentation tree. The following examples show all of
      # the currently supported combinations:
      - "Ansible Builtins": "ansible.builtin"
      - "Collection Showcase":
        - "showcase/index.md"
        - "ansible.posix"
      - "networktocode.nautobot"
    

For more details, check out the detailed User Guide and look at the documentation example of this project's docs themselves which showcase how to build and host collection docs on the awesome Read the Docs service!

Requirements and Compatibility

To generate the pages dynamically at build time, the plugin uses metadata exported by the ansible-doc tool, which must be installed together with the collections you want to generate documentation for in your environment.

The plugin has been built for mkdocs >= 1.6.0 and has only been tested with the Material for MkDocs theme.

Developing

To set up the development environment, run the following commands in the project root:

poetry install
poetry run mkdocs serve

Contributions

!!! warning Work in Progress

This plugin is under initial development - you can track progress towards the first fully functional release [here](https://github.com/cmsirbu/mkdocs-ansible-collection/milestone/1).

Contributions of all sorts (bug reports, features, documentation etc.) are welcome! If you're not sure about any of the changes you are proposing, please open a new issue to discuss it first.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_ansible_collection-0.2.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file mkdocs_ansible_collection-0.2.0.tar.gz.

File metadata

File hashes

Hashes for mkdocs_ansible_collection-0.2.0.tar.gz
Algorithm Hash digest
SHA256 64738a57bee8b0167d8424307c5c8b1e4afffc55db37dfa38837c3a55c81798c
MD5 d5a8e561ea7757d7dc6ed59bc716a9bd
BLAKE2b-256 4a4268de46d1b3e820fc9dea9e9ee308aa9406c2495d0376174fa720791eb83f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_ansible_collection-0.2.0.tar.gz:

Publisher: release.yaml on cmsirbu/mkdocs-ansible-collection

Attestations:

File details

Details for the file mkdocs_ansible_collection-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_ansible_collection-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2ff45f98543c763e9dd46a16221149f2b7933a15cb8fcca2eb9791e4e6d5570
MD5 f69d6330bc16f468c8c376cfede0cab5
BLAKE2b-256 8095d9a6f946a01d62f45ca639988f344d22d7513d0fcdc0c10637a0388df9f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_ansible_collection-0.2.0-py3-none-any.whl:

Publisher: release.yaml on cmsirbu/mkdocs-ansible-collection

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page