Update Chef documentation (12.9, 11.18)

pull/406/head
Thibaut Courouble 9 years ago
parent 6239ead36b
commit 265f162aec

@ -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 =

@ -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

@ -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

@ -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

@ -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"]

@ -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
&copy; 2015 Chef Software, Inc.<br>
Creative Commons Attribution 3.0 Unported License.
HTML
end
end
Loading…
Cancel
Save