diff --git a/assets/stylesheets/application-dark.css.scss b/assets/stylesheets/application-dark.css.scss index 66cd7c72..4350877d 100644 --- a/assets/stylesheets/application-dark.css.scss +++ b/assets/stylesheets/application-dark.css.scss @@ -33,6 +33,7 @@ 'pages/apache', 'pages/bower', 'pages/c', + 'pages/chef', 'pages/chai', 'pages/clojure', 'pages/coffeescript', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 09580553..c86350a6 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -34,6 +34,7 @@ 'pages/bower', 'pages/c', 'pages/chai', + 'pages/chef', 'pages/clojure', 'pages/coffeescript', 'pages/d3', diff --git a/assets/stylesheets/pages/_chef.scss b/assets/stylesheets/pages/_chef.scss new file mode 100644 index 00000000..42c15758 --- /dev/null +++ b/assets/stylesheets/pages/_chef.scss @@ -0,0 +1,4 @@ +._chef { + @extend %simple; + +} \ No newline at end of file diff --git a/lib/docs/filters/chef/clean_html.rb b/lib/docs/filters/chef/clean_html.rb new file mode 100644 index 00000000..5d79623b --- /dev/null +++ b/lib/docs/filters/chef/clean_html.rb @@ -0,0 +1,10 @@ +module Docs + class Chef + class CleanHtmlFilter < Filter + def call + css('h1 a', 'h2 a', 'h3 a','div.footer').remove + doc + end + end + end +end diff --git a/lib/docs/filters/chef/entries.rb b/lib/docs/filters/chef/entries.rb new file mode 100644 index 00000000..0c52fcf9 --- /dev/null +++ b/lib/docs/filters/chef/entries.rb @@ -0,0 +1,10 @@ +module Docs + class Chef + class EntriesFilter < Docs::EntriesFilter + def get_name + at_css('div.body h1 a').remove + at_css('div.body h1').content + end + end + end +end diff --git a/lib/docs/scrapers/chef.rb b/lib/docs/scrapers/chef.rb new file mode 100644 index 00000000..9ed4ae3c --- /dev/null +++ b/lib/docs/scrapers/chef.rb @@ -0,0 +1,27 @@ +module Docs + class Chef < UrlScraper + self.name = 'Chef' + self.slug = 'chef' + self.type = 'chef' + self.version = '12.5' + self.base_url = 'https://docs.chef.io/' + self.links = { + home: 'https://www.chef.io/', + docs: 'https://docs.chef.io/' + } + + html_filters.push 'chef/entries', 'chef/clean_html' + + options[:container] = '.bodywrapper' + + options[:only_patterns] = [/resource_.*.html/] + options[:skip_patterns] = [/resource_common\.html/] + + options[:trailing_slash] = false + + options[:attribution] = <<-HTML + © 2015 Chef Software, Inc.
+ Creative Commons Attribution 3.0 Unported License. + HTML + end +end diff --git a/public/icons/docs/chef/16.png b/public/icons/docs/chef/16.png new file mode 100644 index 00000000..e7792f94 Binary files /dev/null and b/public/icons/docs/chef/16.png differ diff --git a/public/icons/docs/chef/16@2x.png b/public/icons/docs/chef/16@2x.png new file mode 100644 index 00000000..5c8d5c30 Binary files /dev/null and b/public/icons/docs/chef/16@2x.png differ diff --git a/public/icons/docs/chef/SOURCE b/public/icons/docs/chef/SOURCE new file mode 100644 index 00000000..8d21f1f4 --- /dev/null +++ b/public/icons/docs/chef/SOURCE @@ -0,0 +1 @@ +http://style.chef.io/assets/images/downloads/Chef_Regular.png \ No newline at end of file