mirror of https://github.com/freeCodeCamp/devdocs
parent
44e1f216c4
commit
9098ff5275
@ -1,10 +0,0 @@
|
|||||||
module Docs
|
|
||||||
class Jquery
|
|
||||||
class CleanUrlsFilter < Filter
|
|
||||||
def call
|
|
||||||
html.gsub! 'local.api.jquery', 'api.jquery'
|
|
||||||
html
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,19 +1,22 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class JqueryCore < Jquery
|
class JqueryCore < Jquery
|
||||||
self.name = 'jQuery'
|
self.name = 'jQuery'
|
||||||
self.release = 'up to 2.1.0'
|
self.release = 'up to 2.2.0'
|
||||||
self.base_url = 'http://local.api.jquery.com'
|
self.base_url = 'https://api.jquery.com/'
|
||||||
|
self.initial_paths = %w(/index/index)
|
||||||
|
|
||||||
html_filters.insert_before 'jquery/clean_html', 'jquery_core/entries'
|
html_filters.insert_before 'jquery/clean_html', 'jquery_core/entries'
|
||||||
|
|
||||||
options[:root_title] = 'jQuery'
|
options[:root_title] = 'jQuery'
|
||||||
|
|
||||||
# Duplicates
|
options[:fix_urls] = ->(url) do
|
||||||
options[:skip] = %w(/selectors/odd /selectors/even /selectors/event
|
url.sub! 'http://api.jquery.com/', 'https://api.jquery.com/'
|
||||||
/selected /checked)
|
end
|
||||||
|
|
||||||
options[:replace_paths] = {
|
options[:skip_patterns] += [
|
||||||
'/index/' => '/index/index',
|
/h\/deferred\.reject/i,
|
||||||
'/h/deferred.reject/' => '/deferred.reject' }
|
/Selectors\/odd/i,
|
||||||
|
/index/i
|
||||||
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue