diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-04-24 13:10:42 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-24 13:10:42 -0700 |
commit | 631e2f61ac4bfffecb3bb000008bcea4315fe5c9 (patch) | |
tree | 6de36593c79bb8caa226d1a1485e06a0f4ecd39f | |
parent | c4cb2dd208783adcd863c31fae5cb45b3f34a12a (diff) | |
download | chef-631e2f61ac4bfffecb3bb000008bcea4315fe5c9.tar.gz |
Don't add the weight to the yaml anymore
It turns out if you don't add this they're just alphabetical which is what we were trying to do anyways.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-x | tasks/docs.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb index c7c512996f..c4d6d5a07a 100755 --- a/tasks/docs.rb +++ b/tasks/docs.rb @@ -139,7 +139,6 @@ namespace :docs_site do "title" => name, "identifier" => "chef_infra/cookbook_reference/resources/#{name} #{name}", "parent" => "chef_infra/cookbook_reference/resources", - "weight" => @weight, }, } end @@ -293,12 +292,6 @@ namespace :docs_site do FileUtils.mkdir_p "docs_site" resources = Chef::JSONCompat.parse(ResourceInspector.inspect) - # sort the hash so we can generate the menu weights later - resources = Hash[resources.sort] - - # weight is used to build the menu order. We start at 70 and increment by 10 each time - @weight = 70 - resources.each do |resource, data| # skip some resources we don't directly document next if ["whyrun_safe_ruby_block", "l_w_r_p_base", "user_resource_abstract_base_class", "linux_user", "pw_user", "aix_user", "dscl_user", "solaris_user", "windows_user", "mac_user", ""].include?(resource) @@ -319,8 +312,6 @@ namespace :docs_site do FileUtils.mkdir_p "docs_site/#{resource}" File.open("docs_site/#{resource}/_index.md", "w") { |f| f.write(resource_data.to_yaml) } end - - @weight += 10 end end end |