# How do you write your DSL documentation?

**URL:** https://discuss.gradle.org/t/how-do-you-write-your-dsl-documentation/5285
**Category:** Old Forum Archive
**Created:** [March 24, 2015, 12:36pm UTC](https://discuss.gradle.org/t/how-do-you-write-your-dsl-documentation/5285 "2015-03-24T12:36:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Fred\_Thiele](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/fred_thiele/32/988_2.png) [@Fred\_Thiele](https://discuss.gradle.org/u/Fred_Thiele)
#### Post date: [March 24, 2015, 12:36pm UTC](https://discuss.gradle.org/t/how-do-you-write-your-dsl-documentation/5285/1 "2015-03-24T12:36:00Z")

</div>

I’m curious if there’s a convinient process to generate a DSL in a common way, so that a Gradle style DSL documentation results. How do you do this ATM?

---

<div class="post-metadata">

### Author: ![Rene](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rene/32/8082_2.png) [@Rene](https://discuss.gradle.org/u/Rene)
#### Post date: [March 24, 2015, 1:19pm UTC](https://discuss.gradle.org/t/how-do-you-write-your-dsl-documentation/5285/2 "2015-03-24T13:19:00Z")

</div>

The gradle project currently uses a very custom approach to generate the DSL documentation.   
In short:  
  
1. we&nbsp;extract meta-data from the Groovy and Java source files which make up the Gradle API  
2. Then we generate docbook xml out of this (see&nbsp;[http://www.docbook.org](http://www.docbook.org "Link http//wwwdocbookorg"))  
3. We generate html&nbsp;from the docbook content.  
  
You can have a look the the docs subproject in the gradle codebase for more details. see&nbsp;[https://github.com/gradle/gradle/tree/master/subprojects/docs](https://github.com/gradle/gradle/tree/master/subprojects/docs)  
  
hope that helps. You might also want to take a look at&nbsp;[http://asciidoctor.org](http://asciidoctor.org)&nbsp;for automating your documentation workflow.  
  
cheers,  
René&nbsp;

---

<div class="post-metadata">

### Author: ![Fred\_Thiele](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/fred_thiele/32/988_2.png) [@Fred\_Thiele](https://discuss.gradle.org/u/Fred_Thiele)
#### Post date: [March 24, 2015, 1:37pm UTC](https://discuss.gradle.org/t/how-do-you-write-your-dsl-documentation/5285/3 "2015-03-24T13:37:00Z")

</div>

Thanks a lot, I’ll check this during the next days. Cheers!
