summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-29 14:51:58 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-29 14:51:58 -0700
commitd68d7eab64e47a1f42ddaffa6f8c85fec3c9830c (patch)
tree43a9ebeafb19995c3ad6bf55538b012ba178f9f9 /tasks
parent5767d125bcafe71cbac0bfde529c7cca8db1327c (diff)
downloadchef-d68d7eab64e47a1f42ddaffa6f8c85fec3c9830c.tar.gz
Comment why we append --- in the docs generator
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 67b8950aec..22f70be43a 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -305,6 +305,8 @@ namespace :docs_site do
else
puts "Writing out #{resource}."
FileUtils.mkdir_p "docs_site/#{resource}"
+ # write out the yaml contents of the hash and append a --- since this is actually a yaml
+ # block in the middle of a markdown page and the block needs an ending
File.open("docs_site/#{resource}/_index.md", "w") { |f| f.write(resource_data.to_yaml + "---") }
end
end