Unified · Split
| @@ -477,7 +477,7 @@ credits = [ · 476 unmodified lines | |||
| 477 | 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE' | 477 | 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE' |
| 478 | ], [ | 478 | ], [ |
| 479 | 'Vagrant', | 479 | 'Vagrant', |
| 480 | '2010-2015 Mitchell Hashimoto', | 480 | '2010-2016 Mitchell Hashimoto', |
| 481 | 'MIT', | 481 | 'MIT', |
| 482 | 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE' | 482 | 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE' |
| 483 | ], [ | 483 | ], [ |
| @@ -36,6 +36,7 @@ app.views.SphinxSimplePage = · 35 unmodified lines | |||
| 36 | app.views.TensorflowPage = | 36 | app.views.TensorflowPage = |
| 37 | app.views.TypescriptPage = | 37 | app.views.TypescriptPage = |
| 38 | app.views.UnderscorePage = | 38 | app.views.UnderscorePage = |
| 39 | app.views.VagrantPage = | ||
| 39 | app.views.VuePage = | 40 | app.views.VuePage = |
| 40 | app.views.WebpackPage = | 41 | app.views.WebpackPage = |
| 41 | app.views.SimplePage | 42 | app.views.SimplePage |
| @@ -1,5 +0,0 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.VagrantPage extends app.views.BasePage | ||
| 4 | prepare: -> | ||
| 5 | @highlightCode @findAll('pre.ruby'), 'ruby' | ||
| @@ -2,12 +2,12 @@ module Docs · 1 unmodified line | |||
| 2 | class Vagrant | 2 | class Vagrant |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | @doc = at_css('.page-contents .span8') | 5 | @doc = at_css('#main-content .bs-docs-section') |
| 6 | 6 | ||
| 7 | css('hr').remove | 7 | css('hr').remove |
| 8 | 8 | ||
| 9 | css('pre > code').each do |node| | 9 | css('pre > code').each do |node| |
| 10 | node.parent['class'] = node['class'] | 10 | node.parent['data-language'] = 'ruby' |
| 11 | node.before(node.children).remove | 11 | node.before(node.children).remove |
| 12 | end | 12 | end |
| 13 | 13 | ||
| @@ -12,14 +12,17 @@ module Docs · 11 unmodified lines | |||
| 12 | end | 12 | end |
| 13 | 13 | ||
| 14 | def get_type | 14 | def get_type |
| 15 | at_css('.sidebar-nav li.current').content | 15 | type = at_css('.docs-sidenav > li.active > a').content |
| 16 | node = at_css('.docs-sidenav > li.active > ul > li.active > a + ul') | ||
| 17 | type << ": #{node.previous_element.content}" if node | ||
| 18 | type | ||
| 16 | end | 19 | end |
| 17 | 20 | ||
| 18 | def additional_entries | 21 | def additional_entries |
| 19 | case at_css('h1 + p > strong > code').try(:content) | 22 | case at_css('h1 + p > strong > code').try(:content) |
| 20 | when /config\./ | 23 | when /config\./ |
| 21 | h2 = nil | 24 | h2 = nil |
| 22 | css('.page-contents .span8 > *').each_with_object [] do |node, entries| | 25 | css('#main-content .bs-docs-section > *').each_with_object [] do |node, entries| |
| 23 | next if node.name == 'pre' | 26 | next if node.name == 'pre' |
| 24 | if node.name == 'h2' | 27 | if node.name == 'h2' |
| 25 | h2 = node.content | 28 | h2 = node.content |
| @@ -2,8 +2,9 @@ module Docs · 1 unmodified line | |||
| 2 | class Vagrant < UrlScraper | 2 | class Vagrant < UrlScraper |
| 3 | self.name = 'Vagrant' | 3 | self.name = 'Vagrant' |
| 4 | self.type = 'vagrant' | 4 | self.type = 'vagrant' |
| 5 | self.release = '1.8.1' | 5 | self.release = '1.8.3' |
| 6 | self.base_url = 'https://docs.vagrantup.com/v2/' | 6 | self.base_url = 'https://www.vagrantup.com/docs/' |
| 7 | self.root_path = 'index.html' | ||
| 7 | self.links = { | 8 | self.links = { |
| 8 | home: 'https://www.vagrantup.com/', | 9 | home: 'https://www.vagrantup.com/', |
| 9 | code: 'https://github.com/mitchellh/vagrant' | 10 | code: 'https://github.com/mitchellh/vagrant' |
| @@ -12,7 +13,7 @@ module Docs · 2 unmodified lines | |||
| 12 | html_filters.push 'vagrant/entries', 'vagrant/clean_html' | 13 | html_filters.push 'vagrant/entries', 'vagrant/clean_html' |
| 13 | 14 | ||
| 14 | options[:attribution] = <<-HTML | 15 | options[:attribution] = <<-HTML |
| 15 | © 2010–2015 Mitchell Hashimoto<br> | 16 | © 2010–2016 Mitchell Hashimoto<br> |
| 16 | Licensed under the MIT License. | 17 | Licensed under the MIT License. |
| 17 | HTML | 18 | HTML |
| 18 | end | 19 | end |