|
|
@@ -1,5 +1,5 @@
|
|
|
module Docs
|
|
|
- class RestFramework < UrlScraper
|
|
|
+ class RestFramework < Mkdocs
|
|
|
self.name = 'Django REST Framework'
|
|
|
self.release = '3.9.2'
|
|
|
self.slug = 'rest_framework'
|
|
|
@@ -11,7 +11,7 @@ module Docs
|
|
|
code: 'https://github.com/encode/django-rest-framework'
|
|
|
}
|
|
|
|
|
|
- html_filters.push 'mkdocs/clean_html', 'rest_framework/clean_html', 'rest_framework/entries'
|
|
|
+ html_filters.push 'rest_framework/clean_html', 'rest_framework/entries'
|
|
|
|
|
|
options[:skip_patterns] = [
|
|
|
/\Atopics\//,
|
|
|
@@ -22,16 +22,5 @@ module Docs
|
|
|
Copyright 2011–present Encode OSS Ltd<br>
|
|
|
Licensed under the BSD License.
|
|
|
HTML
|
|
|
-
|
|
|
- private
|
|
|
-
|
|
|
- def handle_response(response)
|
|
|
- # Some scrapped urls don't have ending slash
|
|
|
- # which leads to page duplication
|
|
|
- if !response.url.path.ends_with?('/') && !response.url.path.ends_with?('index.html')
|
|
|
- response.url.path << '/'
|
|
|
- end
|
|
|
- super
|
|
|
- end
|
|
|
end
|
|
|
end
|