kubernetes: improve

pull/1741/head
Simon Legner 3 years ago
parent f7c8c8a6f8
commit bcbf31e715

@ -9,6 +9,10 @@ module Docs
# and all the preceding elements
css('#Operations ~ *').remove
css('#Operations').remove
# remove horizontal rules
css('hr').remove
# remove footer (1.20)
css('.pre-footer').remove
doc
end

@ -7,11 +7,13 @@ module Docs
end
def get_type
name
@doc.parent.css('nav .breadcrumb-item:not(.active)')[-1].content
end
def additional_entries
entries = css('h2').to_a()
# remove the Feedback section
entries.filter! {|node| node.content.strip != 'Feedback' }
# remove the Operations section
entries.filter! {|node| node['id'] != 'Operations' }
# remove the ObjectList section

@ -7,12 +7,10 @@ module Docs
home: 'https://kubernetes.io/',
code: 'https://github.com/kubernetes/kubernetes'
}
self.release = "1.23"
# https://kubernetes.io/docs/reference/kubernetes-api/
html_filters.push 'kubernetes/entries', 'kubernetes/clean_html'
# options[:max_image_size] = 300_000
options[:container] = '.td-content'
options[:attribution] = <<-HTML
@ -28,14 +26,7 @@ module Docs
version '1.20' do
self.release = "#{version}"
verStr = version.sub('.', '-')
self.base_url = "https://v#{verStr}.docs.kubernetes.io/docs/reference/kubernetes-api/"
end
version '1.19' do
self.release = "#{version}"
verStr = version.sub('.', '-')
self.base_url = "https://v#{verStr}.docs.kubernetes.io/docs/reference/kubernetes-api/"
self.base_url = "https://v#{version.sub('.', '-')}.docs.kubernetes.io/docs/reference/kubernetes-api/"
end
def get_latest_version(opts)

Loading…
Cancel
Save