# make webdocs for custom collection

**URL:** <https://forum.ansible.com/t/make-webdocs-for-custom-collection/35704>\
**Category:** Ansible Developer\
**Created:** [September 2, 2021, 5:40pm UTC](https://forum.ansible.com/t/make-webdocs-for-custom-collection/35704 "2021-09-02T17:40:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhiwakar\_Ravikumar](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@Dhiwakar\_Ravikumar](https://forum.ansible.com/u/Dhiwakar_Ravikumar)\
**Post date:** [September 2, 2021, 5:40pm UTC](https://forum.ansible.com/t/make-webdocs-for-custom-collection/35704/1 "2021-09-02T17:40:09Z")

</div>

Hi

I have developed a collection of modules on my local setup.  
Now, I’ve already verified that the CLI docstrings for the modules are printing correctly  
by running

_ansible-doc_

Next, I wanted to generate the HTML webdoc file.  
So I followed the steps listed here.  
[https://docs.ansible.com/ansible/latest/dev\_guide/developing\_modules\_general.html](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html)

[Installing prerequisites via yum (CentOS)](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#id3)

Due to dependencies (for example ansible → paramiko → pynacl → libffi):

sudo yum check-update sudo yum update sudo yum group install “Development Tools” sudo yum install python3-devel openssl-devel libffi libffi-devel

[Creating a development environment (platform-agnostic steps)](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#id4)

1. Clone the Ansible repository: $ git clone [https://github.com/ansible/ansible.git](https://github.com/ansible/ansible.git)

2. Change directory into the repository root dir: $ cd ansible

3. Create a virtual environment: $ python3 -m venv venv (or for Python 2 $ virtualenv venv. Note, this requires you to install the virtualenv package: $ pip install virtualenv)

4. Activate the virtual environment: $ . venv/bin/activate

5. Install development requirements: $ pip install -r requirements.txt

6. Run the environment setup script for each new dev shell process: $ . hacking/env-setup

Now, I manually copied my collection of modules to the location mentioned in STEP 3 below

To check the HTML output of your module documentation:

1. Ensure working [development environment](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#environment-setup).

2. Install required Python packages (drop ‘–user’ in venv/virtualenv):

3. Ensure your module is in the correct directory: lib/ansible/modules/$CATEGORY/mymodule.py.

4. Build HTML from your module documentation: MODULES=mymodule make webdocs

I then tried to find all .html files on the setup, I can’t find the HTML file for the modules in my collection.

Can someone please help me figure out if I’m doing it right ?

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [September 5, 2021, 11:28am UTC](https://forum.ansible.com/t/make-webdocs-for-custom-collection/35704/2 "2021-09-05T11:28:06Z")

</div>

Hi,

instead of trying to force ansible's docsite build to build your  
module/plugin docs for your collection, you could simply create a new  
docsite:

&nbsp;&nbsp;1. Install antsibull ([https://pypi.org/project/antsibull/](https://pypi.org/project/antsibull/))  
&nbsp;&nbsp;2. Create a new directory /foo/bar  
&nbsp;&nbsp;3. Run  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antsibull-docs sphinx-init --use-current \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--dest-dir /foo/bar \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;namespace.name  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where \<namespace.name\> is the name of your collection  
&nbsp;&nbsp;4. Use the generated requirements.txt to install the requirements  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;needed (in a venv or globally, whatever you prefer)  
&nbsp;&nbsp;5. Use the generated shell script to build the docsite

This assumes you have ansible-core installed, and that your collection  
is in a path where ansible-core will find it  
([https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#collections-paths](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths)).

Best,  
Felix
