Unified · Split
| @@ -94,7 +94,6 @@ · 93 unmodified lines | ||
| 94 | 94 | 'pages/tcl_tk', |
| 95 | 95 | 'pages/tensorflow', |
| 96 | 96 | 'pages/underscore', |
| 97 | − 'pages/vagrant', | |
| 98 | 97 | 'pages/vue', |
| 99 | 98 | 'pages/webpack', |
| 100 | 99 | 'pages/yard', |
| @@ -94,7 +94,6 @@ · 93 unmodified lines | ||
| 94 | 94 | 'pages/tcl_tk', |
| 95 | 95 | 'pages/tensorflow', |
| 96 | 96 | 'pages/underscore', |
| 97 | − 'pages/vagrant', | |
| 98 | 97 | 'pages/vue', |
| 99 | 98 | 'pages/webpack', |
| 100 | 99 | 'pages/yard', |
| @@ -38,6 +38,7 @@ · 37 unmodified lines | ||
| 38 | 38 | ._mongoose, |
| 39 | 39 | ._redux, |
| 40 | 40 | ._typescript, |
| 41 | +._vagrant, | |
| 41 | 42 | ._yarn { |
| 42 | 43 | @extend %simple; |
| 43 | 44 | } |
| @@ -1,9 +0,0 @@ | ||
| 1 | −._vagrant { | |
| 2 | − @extend %simple; | |
| 3 | − | |
| 4 | − .alert { @extend %note; } | |
| 5 | − .prev-button { float: left; } | |
| 6 | − .prev-button:before { content: '\2190 '; } | |
| 7 | − .next-button { float: right; } | |
| 8 | − .next-button:after { content: ' \2192'; } | |
| 9 | −} | |
| @@ -2,13 +2,19 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vagrant |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − @doc = at_css('#main-content .bs-docs-section') | |
| 5 | + @doc = at_css('#inner') | |
| 6 | 6 | |
| 7 | − css('hr').remove | |
| 7 | + css('hr', 'a.anchor').remove | |
| 8 | 8 | |
| 9 | − css('pre > code').each do |node| | |
| 10 | − node.parent['data-language'] = 'ruby' | |
| 11 | − node.before(node.children).remove | |
| 9 | + css('.alert').each do |node| | |
| 10 | + node.name = 'blockquote' | |
| 11 | + end | |
| 12 | + | |
| 13 | + css('pre').each do |node| | |
| 14 | + if language = node['class'][/(json|shell|ruby)/, 1] | |
| 15 | + node['data-language'] = language | |
| 16 | + end | |
| 17 | + node.content = node.content | |
| 12 | 18 | end |
| 13 | 19 | |
| 14 | 20 | doc |
| @@ -3,12 +3,14 @@ module Docs · 2 unmodified lines | ||
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def get_name |
| 5 | 5 | if slug.start_with?('push/') |
| 6 | − name = at_css('#main-content h2').try(:content) | |
| 6 | + name = at_css('#inner h2').try(:content) | |
| 7 | 7 | elsif slug.start_with?('cli/') |
| 8 | − name = at_css('#main-content h1 + p > strong > code').try(:content).try(:[], /\s*vagrant\s+[\w\-]+/) | |
| 8 | + name = at_css('#inner h1 + p > strong > code').try(:content).try(:[], /\s*vagrant\s+[\w\-]+/) | |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | − name || at_css('#main-content h1').content | |
| 11 | + name ||= at_css('#inner h1').content | |
| 12 | + name.remove! "» " | |
| 13 | + name | |
| 12 | 14 | end |
| 13 | 15 | |
| 14 | 16 | def get_type |
| @@ -22,11 +24,11 @@ module Docs · 7 unmodified lines | ||
| 22 | 24 | case at_css('h1 + p > strong > code').try(:content) |
| 23 | 25 | when /config\./ |
| 24 | 26 | h2 = nil |
| 25 | − css('#main-content .bs-docs-section > *').each_with_object [] do |node, entries| | |
| 27 | + css('#inner > *').each_with_object [] do |node, entries| | |
| 26 | 28 | next if node.name == 'pre' |
| 27 | 29 | if node.name == 'h2' |
| 28 | − h2 = node.content | |
| 29 | − elsif h2 == 'Available Settings' && (code = node.at_css('code')) && (name = code.content) && name.start_with?('config.') | |
| 30 | + h2 = node['id'] | |
| 31 | + elsif h2 == 'available-settings' && (code = node.at_css('code')) && (name = code.content) && name.start_with?('config.') | |
| 30 | 32 | id = code.parent['id'] = name.parameterize |
| 31 | 33 | entries << [name, id, 'Config'] |
| 32 | 34 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vagrant < UrlScraper |
| 3 | 3 | self.name = 'Vagrant' |
| 4 | 4 | self.type = 'vagrant' |
| 5 | − self.release = '1.9.2' | |
| 5 | + self.release = '1.9.5' | |
| 6 | 6 | self.base_url = 'https://www.vagrantup.com/docs/' |
| 7 | 7 | self.root_path = 'index.html' |
| 8 | 8 | self.links = { |