Update Vite documentation (3.0.4)

pull/1794/head
Simon Legner 3 years ago
parent 00c643a2b7
commit 8e21f967c9

@ -3,7 +3,7 @@ module Docs
class CleanHtmlFilter < Filter
def call
return '<h1>Vite</h1>' if root_page?
@doc = at_css('main .content > div')
@doc = at_css('main h1').parent
css('.demo', '.guide-links', '.footer', '#ad').remove
css('.header-anchor', '.page-edit', '.page-nav').remove
@ -14,6 +14,7 @@ module Docs
# Remove CodePen div
css('.codepen').each do |node|
raise "dsfsdfsdf"
next if node.previous_element.nil?
span = node.css('span:contains("See the Pen")').remove
node.previous_element.add_child(' ')
@ -21,13 +22,6 @@ module Docs
node.remove
end
# Remove code highlighting
css('figure').each do |node|
node.name = 'pre'
node.content = node.at_css('td.code pre').css('.line').map(&:content).join("\n")
node['data-language'] = node['class'][/highlight (\w+)/, 1]
end
css('.line-numbers-wrapper').remove
css('pre').each do |node|
node.content = node.content.strip

@ -8,7 +8,7 @@ module Docs
end
def get_type
at_css('header nav .item.active').content.strip
at_css('aside nav .title-text').content.strip
end
def additional_entries

@ -15,7 +15,9 @@ module Docs
Licensed under the MIT License.
HTML
self.release = '2.9.1'
options[:skip] = %w(team.html plugins/)
self.release = '3.0.4'
self.base_url = 'https://vitejs.dev/'
self.initial_paths = %w(guide/)
html_filters.push 'vite/entries', 'vite/clean_html'

Loading…
Cancel
Save