Unified · Split
| @@ -15,6 +15,7 @@ app.views.ElixirPage = · 14 unmodified lines | ||
| 15 | 15 | app.views.EmberPage = |
| 16 | 16 | app.views.ExpressPage = |
| 17 | 17 | app.views.GoPage = |
| 18 | +app.views.InfluxdataPage = | |
| 18 | 19 | app.views.KotlinPage = |
| 19 | 20 | app.views.LaravelPage = |
| 20 | 21 | app.views.LodashPage = |
| @@ -7,16 +7,20 @@ module Docs · 6 unmodified lines | ||
| 7 | 7 | return doc |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | − doc = @doc.at_css('#page-content') | |
| 10 | + doc = @doc.at_css('article') | |
| 11 | 11 | |
| 12 | − css('.page--contribute', 'hr').remove | |
| 12 | + css('.article-footer', 'hr').remove | |
| 13 | 13 | |
| 14 | − css('.page--body', '.page--title', 'font').each do |node| | |
| 14 | + css('a.offset-anchor').each do |node| | |
| 15 | + node.parent['id'] = node['id'] | |
| 16 | + end | |
| 17 | + | |
| 18 | + css('.article-content', '.article-section', 'font').each do |node| | |
| 15 | 19 | node.before(node.children).remove |
| 16 | 20 | end |
| 17 | 21 | |
| 18 | 22 | css('pre > code').each do |node| |
| 19 | − node.parent['class'] = node['class'] | |
| 23 | + node.parent['data-language'] = node['class'][/language-(\w+)/, 1] if node['class'] | |
| 20 | 24 | node.before(node.children).remove |
| 21 | 25 | end |
| 22 | 26 | |
| @@ -2,15 +2,16 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Influxdata |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def get_name |
| 5 | − at_css('#page-title h1').content | |
| 5 | + at_css('.article-heading h1').content | |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | 8 | def get_type |
| 9 | − product = at_css('.product-switcher--current').content.strip | |
| 9 | + product = at_css('.navbar--current-product').content.split(' ').first.capitalize.sub('db', 'DB') | |
| 10 | 10 | return product if %w(Chronograf Telegraf).include?(product) |
| 11 | 11 | |
| 12 | − node = at_css('#product-sidebar a[href="index"]') | |
| 13 | − node = node.parent.previous_element unless node.parent['class'] == 'product-sidebar--section-title' | |
| 12 | + node = at_css('a.sidebar--page[href="index"]') | |
| 13 | + node ||= at_css('.sidebar--section-title a[href="index"]').parent | |
| 14 | + node = node.previous_element until node['class'] == 'sidebar--section-title' | |
| 14 | 15 | |
| 15 | 16 | type = node.content.strip |
| 16 | 17 | type.remove! ' Reference' |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Influxdata < UrlScraper |
| 3 | 3 | self.name = 'InfluxData' |
| 4 | 4 | self.type = 'influxdata' |
| 5 | − self.release = '0.10' | |
| 5 | + self.release = '0.13' | |
| 6 | 6 | self.base_url = 'https://docs.influxdata.com/' |
| 7 | 7 | |
| 8 | 8 | html_filters.push 'influxdata/entries', 'influxdata/clean_html', 'title' |
| @@ -20,10 +20,6 @@ module Docs · 11 unmodified lines | ||
| 20 | 20 | "influxdb/v#{release}/about/" |
| 21 | 21 | ] |
| 22 | 22 | |
| 23 | − options[:replace_paths] = { | |
| 24 | − "influxdb/v#{release}/guides/clustering/" => 'influxdb/v0.10/clustering/' | |
| 25 | − } | |
| 26 | − | |
| 27 | 23 | options[:attribution] = <<-HTML |
| 28 | 24 | © 2015 InfluxData, Inc.<br> |
| 29 | 25 | Licensed under the MIT license. |