Remove wierd files
Unified · Split
| @@ -2,12 +2,11 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vertx |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − css('hr', 'header', 'nav', '.navbar', '.topbar').remove | |
| 5 | + css('footer', 'hr', 'header', 'nav', '.navbar', '.topbar', '.bg-bg-warning').remove | |
| 6 | 6 | xpath('//*[@id="docs-layout"]/div/div[3]').remove |
| 7 | 7 | xpath('//*[@id="docs-layout"]/div/div[1]').remove |
| 8 | 8 | xpath('//main/div[last()]').remove |
| 9 | 9 | xpath('//main/div[1]').remove |
| 10 | − xpath('//footer').remove | |
| 11 | 10 | css('#changelog').remove if root_page? |
| 12 | 11 | |
| 13 | 12 | # Set id attributes on <h3> instead of an empty <a> |
| @@ -7,7 +7,6 @@ module Docs · 6 unmodified lines | ||
| 7 | 7 | return nil unless node |
| 8 | 8 | |
| 9 | 9 | result = node.content.strip |
| 10 | − result = "v5.0.0 - #{result}" if slug.include?('5.0.0') | |
| 11 | 10 | result << ' event' if type == 'Events' |
| 12 | 11 | result << '()' if node['class'].to_s.include?('function') |
| 13 | 12 | result |
| @@ -1,4 +1,3 @@ | ||
| 1 | − | |
| 2 | 1 | module Docs |
| 3 | 2 | class Vertx < UrlScraper |
| 4 | 3 | self.type = 'vertx' |
| @@ -9,17 +8,30 @@ module Docs · 4 unmodified lines | ||
| 9 | 8 | |
| 10 | 9 | html_filters.push 'vertx/entries', 'vertx/clean_html' |
| 11 | 10 | |
| 12 | − self.base_url = 'https://vertx.io/' | |
| 13 | − self.root_path = 'docs' | |
| 14 | 11 | options[:attribution] = <<-HTML |
| 15 | 12 | by Dor Sahar :) |
| 16 | 13 | HTML |
| 17 | 14 | |
| 18 | 15 | options[:skip_patterns] = [ |
| 19 | 16 | /api/, |
| 17 | + /5.0.0/, | |
| 20 | 18 | /apidocs/, |
| 21 | 19 | /blog/, |
| 22 | 20 | ] |
| 23 | 21 | |
| 22 | + version '5.0.0' do | |
| 23 | + self.release = '5.0.0' | |
| 24 | + self.base_url = "https://vertx.io/docs/" | |
| 25 | + end | |
| 26 | + | |
| 27 | + version '4.5.15' do | |
| 28 | + self.release = '4.5.15' | |
| 29 | + self.base_url = "https://vertx.io/docs/#{self.version}" | |
| 30 | + end | |
| 31 | + | |
| 32 | + version '3.9.16' do | |
| 33 | + self.release = '4.5.15' | |
| 34 | + self.base_url = "https://vertx.io/docs/#{self.version}" | |
| 35 | + end | |
| 24 | 36 | end |
| 25 | 37 | end |