mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Update InfluxData documentation (1.2)
This commit is contained in:
parent
15f4f7f769
commit
92704b21e7
2 changed files with 18 additions and 2 deletions
|
@ -8,6 +8,7 @@ module Docs
|
|||
def get_type
|
||||
product = at_css('.navbar--current-product').content.split(' ').first.capitalize.sub('db', 'DB')
|
||||
return product if %w(Chronograf Telegraf).include?(product)
|
||||
return "#{product}: Tools" if subpath.include?('tools/')
|
||||
|
||||
node = at_css('a.sidebar--page[href="index"]')
|
||||
node ||= at_css('.sidebar--section-title a[href="index"]').parent
|
||||
|
|
|
@ -2,8 +2,12 @@ module Docs
|
|||
class Influxdata < UrlScraper
|
||||
self.name = 'InfluxData'
|
||||
self.type = 'influxdata'
|
||||
self.release = '1.0'
|
||||
self.release = '1.2'
|
||||
self.base_url = 'https://docs.influxdata.com/'
|
||||
self.links = {
|
||||
home: 'https://www.influxdata.com/',
|
||||
code: 'https://github.com/influxdata/influxdb'
|
||||
}
|
||||
|
||||
html_filters.push 'influxdata/entries', 'influxdata/clean_html', 'title'
|
||||
|
||||
|
@ -18,9 +22,20 @@ module Docs
|
|||
"influxdb/v#{release}/sample_data/data_download/",
|
||||
"influxdb/v#{release}/tools/grafana/",
|
||||
"influxdb/v#{release}/about/",
|
||||
"influxdb/v#{release}/external_resources/"
|
||||
"influxdb/v#{release}/external_resources/",
|
||||
"influxdb/v#{release}/administration/security_best_practices/"
|
||||
]
|
||||
|
||||
options[:replace_paths] = {
|
||||
"telegraf/v#{release}/introduction/getting-started-telegraf/" => "telegraf/v#{release}/introduction/getting_started/",
|
||||
"influxdb/v#{release}/write_protocols/line/" => "influxdb/v#{release}/write_protocols/line_protocol_tutorial/",
|
||||
"influxdb/v#{release}/write_protocols/graphite/" => "influxdb/v#{release}/tools/graphite/",
|
||||
"influxdb/v#{release}/clients/api/" => "influxdb/v#{release}/tools/api_client_libraries/",
|
||||
"influxdb/v#{release}/concepts/010_vs_011/" => "influxdb/v#{release}/administration/differences/",
|
||||
"influxdb/v#{release}/write_protocols/write_syntax/" => "influxdb/v#{release}/write_protocols/line_protocol_reference/",
|
||||
"influxdb/v#{release}/write_protocols/udp/" => "influxdb/v#{release}/tools/udp/"
|
||||
}
|
||||
|
||||
options[:fix_urls] = ->(url) do
|
||||
url.sub! %r{/influxdb/v([\d\.]+)/.+/influxdb/v[\d\.]+/}, '/influxdb/v\1/'
|
||||
url
|
||||
|
|
Loading…
Reference in a new issue