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.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

mkdocs_ansible_collection-0.2.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mkdocs_ansible_collection-0.2.1.tar.gz
Algorithm Hash digest
SHA256 02526b2b4062569757b96cabee81febe3904beb032518fcd5c6122f4c6a84758
MD5 e68be835a692732b7ddbf75f7275a600
BLAKE2b-256 10513503b367844bcda5369db929c7b3c86bfbeea52c23b0bc8ee72f82559314

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for mkdocs_ansible_collection-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efb4957d9af90c416d89de1f00fafbc922535c84682f8d6c8446eabd30cb00be
MD5 7f4151968e1945b0f6686493e9f519c5
BLAKE2b-256 22fcd414df1c142e4668230d6862bcaa2cd0c45daca6781aa2d600497dc089b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_ansible_collection-0.2.1-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