Merge pull request #1641 from freeCodeCamp/vue-3.2

Update Vue.js documentation
pull/1643/head
Simon Legner 3 years ago committed by GitHub
commit c2f420aa22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,15 @@ module Docs
node.name = 'strong'
end
# Remove CodePen div
css('.codepen').each do |node|
next if node.previous_element.nil?
span = node.css('span:contains("See the Pen")').remove
node.previous_element.add_child(' ')
node.previous_element.add_child(span)
node.remove
end
# Remove code highlighting
css('figure').each do |node|
node.name = 'pre'

@ -3,7 +3,7 @@ module Docs
class EntriesFilter < Docs::EntriesFilter
def get_name
name = at_css('h1').content
name.remove! '# '
name.sub! %r{#\s*}, ''
name
end
@ -34,9 +34,9 @@ module Docs
title = node
title = title.previous_element until title.name == 'h2'
title = title.content.strip
title.remove! '# '
title.sub! %r{#\s*}, ''
entry_name.remove! '# '
entry_name.sub! %r{#\s*}, ''
case title
when 'Router Construction Options'

@ -4,7 +4,7 @@ module Docs
def get_name
name = at_css('h1').content
name.remove! '# '
name.sub! %r{#\s*}, ''
# Add index on guides
unless subpath.start_with?('api')
@ -42,9 +42,9 @@ module Docs
title = node
title = title.previous_element until title.name == 'h2'
title = title.content.strip
title.remove! '# '
title.sub! %r{#\s*}, ''
entry_name.remove! '# '
entry_name.sub! %r{#\s*}, ''
unless entry_name.start_with?('router.')
case title

@ -10,6 +10,7 @@ module Docs
options[:only_patterns] = [/guide\//, /api\//]
options[:skip] = %w(guide/team.html)
options[:skip_patterns] = [/guide\/contributing/]
options[:replace_paths] = { 'guide/' => 'guide/index.html' }
options[:attribution] = <<-HTML
@ -18,7 +19,7 @@ module Docs
HTML
version '3' do
self.release = '3.2.4'
self.release = '3.2.20'
self.base_url = 'https://v3.vuejs.org/'
self.root_path = 'guide/introduction.html'
self.initial_paths = %w(api/)

@ -21,7 +21,7 @@ module Docs
HTML
version '4' do
self.release = '4.0.3'
self.release = '4.0.12'
self.base_url = 'https://next.router.vuejs.org/'
end

@ -19,7 +19,7 @@ module Docs
HTML
version '4' do
self.release = '4.0.0'
self.release = '4.0.2'
self.base_url = 'https://next.vuex.vuejs.org/'
end

Loading…
Cancel
Save