summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-02-06 20:57:40 -0800
committerTim Smith <tsmith84@gmail.com>2021-02-06 20:57:40 -0800
commita7004cae76f89507a279351fdcb767cbce059574 (patch)
treef7cd86c67071d90ec723dfeb8d1a775bd541781c /tasks
parentced15938c804f4f078050e72b4a6ca82ded4b13c (diff)
downloadchef-a7004cae76f89507a279351fdcb767cbce059574.tar.gz
Document default actions
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 4357d87347..089d4ce27d 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -132,8 +132,8 @@ namespace :docs_site do
#
# @return [Hash]
#
- def action_list(actions)
- actions = actions.map { |k, v| [k.to_sym, { "markdown" => v } ] }.to_h
+ def action_list(actions, default_action)
+ actions = actions.map { |k, v| [k.to_sym, { "markdown" => k == default_action.first ? "#{v} (default)" : v } ] }.to_h
actions[:nothing] = { "shortcode" => "resources_common_actions_nothing.md" }
actions
end
@@ -277,7 +277,7 @@ namespace :docs_site do
r["syntax_full_code_block"] = generate_resource_block(name, properties, data["default_action"])
r["syntax_properties_list"] = nil
r["syntax_full_properties_list"] = friendly_full_property_list(name, properties)
- r["actions_list"] = action_list(data["actions"])
+ r["actions_list"] = action_list(data["actions"], data["default_action"] )
r["properties_list"] = properties_list(properties)
r["examples"] = data["examples"]