summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-30 15:27:47 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-30 15:27:47 -0700
commit015b9fe8e4b0927fc9cb629c9cdaf434bbf1fac9 (patch)
tree7690c5cefdc87bb41223a0dba27691726211032f /tasks
parent2cf99476ba3b27339a7bfa1415184c82ae50ada8 (diff)
downloadchef-015b9fe8e4b0927fc9cb629c9cdaf434bbf1fac9.tar.gz
Docs generation: Add examples & simplify actions
Add the new docs field and skip the special casing of nothing since the hugo template actually handles that. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index d5fd653591..ea9afc051e 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -161,15 +161,10 @@ namespace :docs_site do
def action_list(actions)
list = {}
actions.sort.each do |action|
- # skip it so we can make it the last value later
- next if action == "nothing"
-
- list[action.to_sym] = { "markdown" => nil }
+ # nothing is a special case that sources the content from the docs site
+ list[action.to_sym] = (action == "nothing" ? { "shortcode" => "resources_common_actions_nothing.md" } : { "markdown" => nil })
end
- # add the special case for nothing
- list[:nothing] = { "shortcode" => "resources_common_actions_nothing.md" }
-
list
end
@@ -301,7 +296,7 @@ namespace :docs_site do
r["syntax_full_properties_list"] = friendly_full_property_list(name, properties)
r["actions_list"] = action_list(data["actions"])
r["properties_list"] = properties_list(properties)
- r["examples_list"] = nil
+ r["examples"] = data["examples"]
r
end