salt_stack.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. # The official documentation website is heavily rate-limited
  3. #
  4. # The documentation can be generated like this (replace 2019.2 with the correct tag):
  5. # $ git clone https://github.com/saltstack/salt.git --branch 2019.2 --depth 1
  6. # $ cd salt/doc
  7. # $ pip install sphinx
  8. # $ make html
  9. #
  10. # The generated html can be found in salt/doc/_build/html
  11. class SaltStack < FileScraper
  12. self.type = 'simple'
  13. self.slug = 'saltstack'
  14. self.release = '2019.2.0'
  15. self.base_url = 'https://docs.saltstack.com/en/latest/'
  16. self.root_path = 'ref/index.html'
  17. self.links = {
  18. home: 'https://www.saltstack.com/',
  19. code: 'https://github.com/saltstack/salt'
  20. }
  21. html_filters.push 'salt_stack/clean_html', 'salt_stack/entries'
  22. options[:only_patterns] = [/all\//]
  23. options[:container] = '.body-content > .section'
  24. options[:attribution] = <<-HTML
  25. &copy; 2019 SaltStack.<br>
  26. Licensed under the Apache License, Version 2.0.
  27. HTML
  28. def get_latest_version(opts)
  29. get_latest_github_release('saltstack', 'salt', opts)
  30. end
  31. end
  32. end