# Generate documentation (HTML?) for my module.

**URL:** <https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929>\
**Category:** Ansible Project\
**Created:** [November 18, 2013, 5:11pm UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929 "2013-11-18T17:11:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kashyap\_Bhatt](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@Kashyap\_Bhatt](https://forum.ansible.com/u/Kashyap_Bhatt)\
**Post date:** [November 18, 2013, 5:11pm UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929/1 "2013-11-18T17:11:15Z")

</div>

Hi,

How do I generate the documentation from the docstrings in my module? Is there some python module available?

My module has the required syntax for ansible module documentation.

module: xxx  
short\_description: xxxx  
description:

- xxxx
- xxx

options:  
xxx:  
description:

- xxxx  
required: false  
default: null

author: xxx  
updates: [‘XXX’]  
“”"

EXAMPLES = ‘’’

# xxx

- xxx: yyy  
‘’’

Thanks  
Kashyap

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 18, 2013, 5:13pm UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929/2 "2013-11-18T17:13:01Z")

</div>

This is handled by the “make docs” target.

We run this periodically to update module docs on the website, so you don’t have to run it yourself.

You can also use the “ansible-doc” CLI utility.

---

<div class="post-metadata">

**Author:** ![Kashyap\_Bhatt](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@Kashyap\_Bhatt](https://forum.ansible.com/u/Kashyap_Bhatt)\
**Post date:** [November 18, 2013, 6:49pm UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929/3 "2013-11-18T18:49:09Z")

</div>

> > We run this periodically to update module docs on the website, so you don’t have to run it yourself.  
> > My aim is to debug (check it out) how it looks.

ansible-doc does exactly what I wanted, but only for cli. Is there another script I can run for generating HTML?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 20, 2013, 3:51am UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929/4 "2013-11-20T03:51:07Z")

</div>

“make webdocs” generates the entire doc site, which is what we have up for [ansibleworks.com](http://ansibleworks.com), where the official docs reside.

---

<div class="post-metadata">

**Author:** ![Jeremy\_Schulman](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@Jeremy\_Schulman](https://forum.ansible.com/u/Jeremy_Schulman)\
**Post date:** [March 20, 2014, 6:44pm UTC](https://forum.ansible.com/t/generate-documentation-html-for-my-module/13929/5 "2014-03-20T18:44:25Z")

</div>

I am in the process of writing webdocs for the forthcoming Junos modules. Is there a way to re-generate only a single file; i.e. the module I am working on? This way I would not need to re-generate the entire collection of files each time I make an edit and want to verify the HTML. The rebuild process is not too long, but if there was a known way to do just one file I would prefer that 🙂

Thank you!
