# Local generation of html doc for pluggin?

**URL:** <https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912>\
**Category:** Logstash\
**Created:** [July 20, 2015, 1:11pm UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912 "2015-07-20T13:11:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeveaud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eeveaud/32/3601_2.png) [@eeveaud](https://discuss.elastic.co/u/eeveaud)\
**Post date:** [July 20, 2015, 1:11pm UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912/1 "2015-07-20T13:11:53Z")

</div>

is there a way to generate the html doc for an under development pluggin ?  
I would like to check it before pushing it to git

regards

Eric

---

<div class="post-metadata">

**Author:** ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)\
**Post date:** [July 21, 2015, 12:01am UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912/2 "2015-07-21T00:01:17Z")

</div>

As an example, I will show you how to go about doing so with an existing plugin (`logstash-input-jdbc`)

- make sure you have Logstash cloned locally.

```auto
git clone git@github.com:elastic/logstash.git
cd logstash
rake bootstrap

```

- you will want to install your developmental plugin into this Logstash

```auto
# add this line to your Gemfile in the Logstash repo
gem "logstash-input-jdbc", :path => "/your/local/logstash-input-jdbc"

```

- now, install the added plugin gem

```auto
# from logstash repo directory
rake vendor:gems

```

- now that we have our desired plugin installed, we can use `docgen` to generate our asciidoc

```auto
# from logstash repo directory
bin/logstash docgen ./vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-1.0.0/lib/logstash/inputs/jdbc.rb > jdbc.asciidoc

```

this will output your documentation into a file called `jdbc.asciidoc` and you can view this using your favorite asciidoc previewer.

Let me know how that worked out for you!

---

<div class="post-metadata">

**Author:** ![eeveaud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eeveaud/32/3601_2.png) [@eeveaud](https://discuss.elastic.co/u/eeveaud)\
**Post date:** [July 21, 2015, 11:26am UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912/3 "2015-07-21T11:26:20Z")

</div>

thanks,

it worked smoothly.

with this minimal step.

build logstash from git clone and then

```
bin/logstash docgen /path/to/local/file/to/document/file.rb > doc.asciidoc

```

I just skipped the rake vendor:gems step.

---

<div class="post-metadata">

**Author:** ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)\
**Post date:** [July 21, 2015, 3:53pm UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912/4 "2015-07-21T15:53:45Z")

</div>

ah, well I suppose that path can be arbitrary in that way.

there is also a `-o` flag for `docgen` to specify an output directory instead of outputing to standard out.

glad to see it worked out for you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:34am UTC](https://discuss.elastic.co/t/local-generation-of-html-doc-for-pluggin/25912/5 "2017-07-06T05:34:06Z")

</div>

Closed on July 6, 2017, 5:34am UTC


