diff --git a/assets/javascripts/views/pages/simple.coffee b/assets/javascripts/views/pages/simple.coffee index bfee24d9..a33fb1e1 100644 --- a/assets/javascripts/views/pages/simple.coffee +++ b/assets/javascripts/views/pages/simple.coffee @@ -18,6 +18,7 @@ app.views.PostgresPage = app.views.RamdaPage = app.views.ReactPage = app.views.RethinkdbPage = +app.views.SphinxSimplePage = app.views.TensorflowPage = app.views.TypescriptPage = app.views.UnderscorePage = diff --git a/assets/javascripts/views/pages/sphinx_simple.coffee b/assets/javascripts/views/pages/sphinx_simple.coffee deleted file mode 100644 index 971c25ed..00000000 --- a/assets/javascripts/views/pages/sphinx_simple.coffee +++ /dev/null @@ -1,7 +0,0 @@ -#= require views/pages/base - -class app.views.SphinxSimplePage extends app.views.BasePage - prepare: -> - @highlightCode @findAll('pre.highlight-ruby'), 'ruby' - @highlightCode @findAll('pre.highlight-javascript'), 'javascript' - return diff --git a/lib/docs/filters/chef/clean_html.rb b/lib/docs/filters/chef/clean_html.rb index 05c4e713..364d113e 100644 --- a/lib/docs/filters/chef/clean_html.rb +++ b/lib/docs/filters/chef/clean_html.rb @@ -24,9 +24,10 @@ module Docs node.remove_attribute('border') end - css('div[class^="highlight-"]').each do |node| + css('div[class*="highlight-"]').each do |node| node.content = node.content.strip node.name = 'pre' + node['data-language'] = node['class'][/highlight\-(\w+)/, 1] end doc diff --git a/lib/docs/filters/opentsdb/clean_html.rb b/lib/docs/filters/opentsdb/clean_html.rb index 94d95b45..54392345 100644 --- a/lib/docs/filters/opentsdb/clean_html.rb +++ b/lib/docs/filters/opentsdb/clean_html.rb @@ -14,6 +14,7 @@ module Docs end css('div[class*=highlight] .highlight pre').each do |node| + node['data-language'] = node.parent.parent['class'][/highlight\-(\w+)/, 1] node.parent.parent.before(node) node.content = node.content.gsub(' ', ' ') end diff --git a/lib/docs/scrapers/chef.rb b/lib/docs/scrapers/chef.rb index f5942f82..4a9f026e 100644 --- a/lib/docs/scrapers/chef.rb +++ b/lib/docs/scrapers/chef.rb @@ -24,10 +24,10 @@ module Docs HTML version '12' do - self.release = '12.7' + self.release = '12.9' - options[:client_path] = client_path = '12-7' - options[:server_path] = server_path = 'server_12-4' + options[:client_path] = client_path = '12-9' + options[:server_path] = server_path = 'server_12-5' self.root_path = "#{client_path}/chef_overview.html" self.initial_paths = ["#{server_path}/server_components.html"] @@ -39,7 +39,7 @@ module Docs self.release = '11.18' options[:client_path] = client_path = '11-18' - options[:server_path] = server_path = 'server_12-4' + options[:server_path] = server_path = 'server_12-5' self.root_path = "#{client_path}/chef_overview.html" self.initial_paths = ["#{server_path}/server_components.html"] diff --git a/lib/docs/scrapers/chefclient.rb b/lib/docs/scrapers/chefclient.rb deleted file mode 100644 index 8eff8b68..00000000 --- a/lib/docs/scrapers/chefclient.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Docs - class Chefclient < UrlScraper - self.name = 'Chef Client' - self.slug = 'chefclient' - self.type = 'chefclient' - self.version = '12.5' - self.base_url = "https://docs.chef.io/release/#{version.sub '.', '-'}/" - self.links = { - home: 'https://www.chef.io/', - docs: 'https://docs.chef.io/' - } - - html_filters.push 'chefclient/entries', 'chefclient/clean_html' - - options[:fix_urls] = ->(url) do - url.remove! %r{/release/[0-9\-+]/} - url - end - - options[:skip_patterns] = [/_images\//] - options[:trailing_slash] = false - - options[:attribution] = <<-HTML - © 2015 Chef Software, Inc.
- Creative Commons Attribution 3.0 Unported License. - HTML - end -end