Showing the changes to lib (3 of 5 files). Show all
Unified · Split
| @@ -6,7 +6,7 @@ module Docs · 5 unmodified lines | ||
| 6 | 6 | |
| 7 | 7 | at_css('h1').content = 'Vue.js' if root_page? |
| 8 | 8 | |
| 9 | − css('#demo').remove | |
| 9 | + css('.demo', '.guide-links', '.footer').remove | |
| 10 | 10 | |
| 11 | 11 | # Remove code highlighting |
| 12 | 12 | css('figure').each do |node| |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vue |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def get_name |
| 5 | − at_css('h1').content | |
| 5 | + at_css('h1').content.presence || 'API' | |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | 8 | def get_type |
| @@ -15,11 +15,16 @@ module Docs · 6 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | def additional_entries |
| 17 | 17 | return [] if slug.start_with?('guide') |
| 18 | + type = nil | |
| 18 | 19 | |
| 19 | − css('h3').map do |node| | |
| 20 | − name = node.content.strip | |
| 21 | − name.sub! %r{\(.*\)}, '()' | |
| 22 | − [name, node['id'], "API: #{self.name}"] | |
| 20 | + css('h2, h3').each_with_object [] do |node, entries| | |
| 21 | + if node.name == 'h2' | |
| 22 | + type = node.content.strip | |
| 23 | + else | |
| 24 | + name = node.content.strip | |
| 25 | + name.sub! %r{\(.*\)}, '()' | |
| 26 | + entries << [name, node['id'], "API: #{type}"] | |
| 27 | + end | |
| 23 | 28 | end |
| 24 | 29 | end |
| 25 | 30 | end |
| @@ -3,7 +3,7 @@ module Docs · 2 unmodified lines | ||
| 3 | 3 | self.name = 'Vue.js' |
| 4 | 4 | self.slug = 'vue' |
| 5 | 5 | self.type = 'vue' |
| 6 | − self.version = '0.12.14' | |
| 6 | + self.version = '1.0.4' | |
| 7 | 7 | self.base_url = 'http://vuejs.org' |
| 8 | 8 | self.root_path = '/guide/index.html' |
| 9 | 9 | self.initial_paths = %w(/api/index.html) |