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
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
As an example, I will show you how to go about doing so with an existing plugin (logstash-input-jdbc
)
git clone git@github.com:elastic/logstash.git
cd logstash
rake bootstrap
# add this line to your Gemfile in the Logstash repo
gem "logstash-input-jdbc", :path => "/your/local/logstash-input-jdbc"
# from logstash repo directory
rake vendor:gems
docgen
to generate our asciidoc# 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!
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.
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!
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.