Update Vagrant documentation (1.8.3)

pull/421/merge
Thibaut Courouble 9 years ago
parent 3146b4829b
commit 41d631539c

@ -477,7 +477,7 @@ credits = [
'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'
], [
'Vagrant',
'2010-2015 Mitchell Hashimoto',
'2010-2016 Mitchell Hashimoto',
'MIT',
'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE'
], [

@ -36,6 +36,7 @@ app.views.SphinxSimplePage =
app.views.TensorflowPage =
app.views.TypescriptPage =
app.views.UnderscorePage =
app.views.VagrantPage =
app.views.VuePage =
app.views.WebpackPage =
app.views.SimplePage

@ -1,5 +0,0 @@
#= require views/pages/base
class app.views.VagrantPage extends app.views.BasePage
prepare: ->
@highlightCode @findAll('pre.ruby'), 'ruby'

@ -2,12 +2,12 @@ module Docs
class Vagrant
class CleanHtmlFilter < Filter
def call
@doc = at_css('.page-contents .span8')
@doc = at_css('#main-content .bs-docs-section')
css('hr').remove
css('pre > code').each do |node|
node.parent['class'] = node['class']
node.parent['data-language'] = 'ruby'
node.before(node.children).remove
end

@ -12,14 +12,17 @@ module Docs
end
def get_type
at_css('.sidebar-nav li.current').content
type = at_css('.docs-sidenav > li.active > a').content
node = at_css('.docs-sidenav > li.active > ul > li.active > a + ul')
type << ": #{node.previous_element.content}" if node
type
end
def additional_entries
case at_css('h1 + p > strong > code').try(:content)
when /config\./
h2 = nil
css('.page-contents .span8 > *').each_with_object [] do |node, entries|
css('#main-content .bs-docs-section > *').each_with_object [] do |node, entries|
next if node.name == 'pre'
if node.name == 'h2'
h2 = node.content

@ -2,8 +2,9 @@ module Docs
class Vagrant < UrlScraper
self.name = 'Vagrant'
self.type = 'vagrant'
self.release = '1.8.1'
self.base_url = 'https://docs.vagrantup.com/v2/'
self.release = '1.8.3'
self.base_url = 'https://www.vagrantup.com/docs/'
self.root_path = 'index.html'
self.links = {
home: 'https://www.vagrantup.com/',
code: 'https://github.com/mitchellh/vagrant'
@ -12,7 +13,7 @@ module Docs
html_filters.push 'vagrant/entries', 'vagrant/clean_html'
options[:attribution] = <<-HTML
&copy; 2010&ndash;2015 Mitchell Hashimoto<br>
&copy; 2010&ndash;2016 Mitchell Hashimoto<br>
Licensed under the MIT License.
HTML
end

Loading…
Cancel
Save