mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
parent
a500ed8a02
commit
b13fa12848
2 changed files with 12 additions and 3 deletions
|
@ -4,7 +4,7 @@ require "erb"
|
||||||
|
|
||||||
if ARGV.size != 2
|
if ARGV.size != 2
|
||||||
$stderr.puts "No path given to search for plugin docs"
|
$stderr.puts "No path given to search for plugin docs"
|
||||||
$stderr.puts "Usage: #{$0} plugin_doc_dir"
|
$stderr.puts "Usage: #{$0} plugin_doc_dir type"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,4 +26,10 @@ docs = plugins(File.join(basedir, "#{type}/*.asciidoc"))
|
||||||
template_path = File.join(File.dirname(__FILE__), "index-#{type}.asciidoc.erb")
|
template_path = File.join(File.dirname(__FILE__), "index-#{type}.asciidoc.erb")
|
||||||
template = File.new(template_path).read
|
template = File.new(template_path).read
|
||||||
erb = ERB.new(template, nil, "-")
|
erb = ERB.new(template, nil, "-")
|
||||||
puts erb.result(binding)
|
|
||||||
|
path = "#{basedir}/#{type}.asciidoc"
|
||||||
|
|
||||||
|
File.open(path, "w") do |out|
|
||||||
|
html = erb.result(binding)
|
||||||
|
out.puts(html)
|
||||||
|
end
|
||||||
|
|
|
@ -23,8 +23,11 @@ These are the config options
|
||||||
end
|
end
|
||||||
-%>
|
-%>
|
||||||
[[plugins-<%= section%>s-<%= plugin_name%>-<%= name%>]]
|
[[plugins-<%= section%>s-<%= plugin_name%>-<%= name%>]]
|
||||||
===== `<%= name %>` <%= " (required setting)" if config[:required] %><%= " (DEPRECATED)" if config[:deprecated] %>
|
===== `<%= name %>` <%= " (DEPRECATED)" if config[:deprecated] %>
|
||||||
|
|
||||||
|
<% if config[:required] -%>
|
||||||
|
* This is a required setting.
|
||||||
|
<% end -%>
|
||||||
<% if config[:deprecated] -%>
|
<% if config[:deprecated] -%>
|
||||||
* DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
|
* DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue