Minor doc fixes

Fixes #1741
This commit is contained in:
Richard Pijnenburg 2014-10-02 20:12:36 +00:00 committed by Jordan Sissel
parent a500ed8a02
commit b13fa12848
2 changed files with 12 additions and 3 deletions

View file

@ -4,7 +4,7 @@ require "erb"
if ARGV.size != 2
$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
end
@ -26,4 +26,10 @@ docs = plugins(File.join(basedir, "#{type}/*.asciidoc"))
template_path = File.join(File.dirname(__FILE__), "index-#{type}.asciidoc.erb")
template = File.new(template_path).read
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

View file

@ -23,8 +23,11 @@ These are the config options
end
-%>
[[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] -%>
* DEPRECATED WARNING: This config item is deprecated. It may be removed in a further version.
<% end -%>