|
|
@@ -1,8 +1,19 @@
|
|
|
module Docs
|
|
|
- class SaltStack < UrlScraper
|
|
|
- self.type = 'salt_stack'
|
|
|
- self.release = '2018.3.2'
|
|
|
- self.base_url = 'https://docs.saltstack.com/en/latest/ref/'
|
|
|
+ # The official documentation website is heavily rate-limited
|
|
|
+ #
|
|
|
+ # The documentation can be generated like this (replace 2019.2 with the correct tag):
|
|
|
+ # $ git clone https://github.com/saltstack/salt.git --branch 2019.2 --depth 1
|
|
|
+ # $ cd salt/doc
|
|
|
+ # $ pip install sphinx
|
|
|
+ # $ make html
|
|
|
+ #
|
|
|
+ # The generated html can be found in salt/doc/_build/html
|
|
|
+ class SaltStack < FileScraper
|
|
|
+ self.type = 'simple'
|
|
|
+ self.slug = 'salt_stack'
|
|
|
+ self.release = '2019.2.0'
|
|
|
+ self.base_url = 'https://docs.saltstack.com/en/latest/'
|
|
|
+ self.root_path = 'ref/index.html'
|
|
|
self.links = {
|
|
|
home: 'https://www.saltstack.com/',
|
|
|
code: 'https://github.com/saltstack/salt'
|
|
|
@@ -10,15 +21,16 @@ module Docs
|
|
|
|
|
|
html_filters.push 'salt_stack/clean_html', 'salt_stack/entries'
|
|
|
|
|
|
- options[:only_patterns] = [
|
|
|
- %r{^[^/]+/all/}
|
|
|
- ]
|
|
|
-
|
|
|
- options[:container] = '.body-content'
|
|
|
+ options[:only_patterns] = [/all\//]
|
|
|
+ options[:container] = '.body-content > .section'
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
- © 2018 SaltStack.<br>
|
|
|
+ © 2019 SaltStack.<br>
|
|
|
Licensed under the Apache License, Version 2.0.
|
|
|
HTML
|
|
|
+
|
|
|
+ def get_latest_version(opts)
|
|
|
+ get_latest_github_release('saltstack', 'salt', opts)
|
|
|
+ end
|
|
|
end
|
|
|
end
|