Unified · Split
| @@ -18,6 +18,7 @@ app.views.PostgresPage = · 17 unmodified lines | |||
| 18 | app.views.RamdaPage = | 18 | app.views.RamdaPage = |
| 19 | app.views.ReactPage = | 19 | app.views.ReactPage = |
| 20 | app.views.RethinkdbPage = | 20 | app.views.RethinkdbPage = |
| 21 | app.views.SphinxSimplePage = | ||
| 21 | app.views.TensorflowPage = | 22 | app.views.TensorflowPage = |
| 22 | app.views.TypescriptPage = | 23 | app.views.TypescriptPage = |
| 23 | app.views.UnderscorePage = | 24 | app.views.UnderscorePage = |
| @@ -1,7 +0,0 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.SphinxSimplePage extends app.views.BasePage | ||
| 4 | prepare: -> | ||
| 5 | @highlightCode @findAll('pre.highlight-ruby'), 'ruby' | ||
| 6 | @highlightCode @findAll('pre.highlight-javascript'), 'javascript' | ||
| 7 | return | ||
| @@ -24,9 +24,10 @@ module Docs · 23 unmodified lines | |||
| 24 | node.remove_attribute('border') | 24 | node.remove_attribute('border') |
| 25 | end | 25 | end |
| 26 | 26 | ||
| 27 | css('div[class^="highlight-"]').each do |node| | 27 | css('div[class*="highlight-"]').each do |node| |
| 28 | node.content = node.content.strip | 28 | node.content = node.content.strip |
| 29 | node.name = 'pre' | 29 | node.name = 'pre' |
| 30 | node['data-language'] = node['class'][/highlight\-(\w+)/, 1] | ||
| 30 | end | 31 | end |
| 31 | 32 | ||
| 32 | doc | 33 | doc |
| @@ -14,6 +14,7 @@ module Docs · 13 unmodified lines | |||
| 14 | end | 14 | end |
| 15 | 15 | ||
| 16 | css('div[class*=highlight] .highlight pre').each do |node| | 16 | css('div[class*=highlight] .highlight pre').each do |node| |
| 17 | node['data-language'] = node.parent.parent['class'][/highlight\-(\w+)/, 1] | ||
| 17 | node.parent.parent.before(node) | 18 | node.parent.parent.before(node) |
| 18 | node.content = node.content.gsub(' ', ' ') | 19 | node.content = node.content.gsub(' ', ' ') |
| 19 | end | 20 | end |
| @@ -24,10 +24,10 @@ module Docs · 23 unmodified lines | |||
| 24 | HTML | 24 | HTML |
| 25 | 25 | ||
| 26 | version '12' do | 26 | version '12' do |
| 27 | self.release = '12.7' | 27 | self.release = '12.9' |
| 28 | 28 | ||
| 29 | options[:client_path] = client_path = '12-7' | 29 | options[:client_path] = client_path = '12-9' |
| 30 | options[:server_path] = server_path = 'server_12-4' | 30 | options[:server_path] = server_path = 'server_12-5' |
| 31 | 31 | ||
| 32 | self.root_path = "#{client_path}/chef_overview.html" | 32 | self.root_path = "#{client_path}/chef_overview.html" |
| 33 | self.initial_paths = ["#{server_path}/server_components.html"] | 33 | self.initial_paths = ["#{server_path}/server_components.html"] |
| @@ -39,7 +39,7 @@ module Docs · 5 unmodified lines | |||
| 39 | self.release = '11.18' | 39 | self.release = '11.18' |
| 40 | 40 | ||
| 41 | options[:client_path] = client_path = '11-18' | 41 | options[:client_path] = client_path = '11-18' |
| 42 | options[:server_path] = server_path = 'server_12-4' | 42 | options[:server_path] = server_path = 'server_12-5' |
| 43 | 43 | ||
| 44 | self.root_path = "#{client_path}/chef_overview.html" | 44 | self.root_path = "#{client_path}/chef_overview.html" |
| 45 | self.initial_paths = ["#{server_path}/server_components.html"] | 45 | self.initial_paths = ["#{server_path}/server_components.html"] |
| @@ -1,28 +0,0 @@ | |||
| 1 | module Docs | ||
| 2 | class Chefclient < UrlScraper | ||
| 3 | self.name = 'Chef Client' | ||
| 4 | self.slug = 'chefclient' | ||
| 5 | self.type = 'chefclient' | ||
| 6 | self.version = '12.5' | ||
| 7 | self.base_url = "https://docs.chef.io/release/#{version.sub '.', '-'}/" | ||
| 8 | self.links = { | ||
| 9 | home: 'https://www.chef.io/', | ||
| 10 | docs: 'https://docs.chef.io/' | ||
| 11 | } | ||
| 12 | |||
| 13 | html_filters.push 'chefclient/entries', 'chefclient/clean_html' | ||
| 14 | |||
| 15 | options[:fix_urls] = ->(url) do | ||
| 16 | url.remove! %r{/release/[0-9\-+]/} | ||
| 17 | url | ||
| 18 | end | ||
| 19 | |||
| 20 | options[:skip_patterns] = [/_images\//] | ||
| 21 | options[:trailing_slash] = false | ||
| 22 | |||
| 23 | options[:attribution] = <<-HTML | ||
| 24 | © 2015 Chef Software, Inc.<br> | ||
| 25 | Creative Commons Attribution 3.0 Unported License. | ||
| 26 | HTML | ||
| 27 | end | ||
| 28 | end | ||