nushell.rb 975 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. module Docs
  2. class Nushell < UrlScraper
  3. include MultipleBaseUrls
  4. self.name = "Nushell"
  5. self.slug = "nushell"
  6. self.type = "nushell"
  7. self.release = "0.85.0"
  8. self.links = {
  9. home: "https://www.nushell.sh/",
  10. code: "https://github.com/nushell/nushell",
  11. }
  12. html_filters.push "nushell/clean_html", "nushell/entries", "nushell/fix_links"
  13. options[:container] = '.theme-container'
  14. options[:follow_links] = true
  15. options[:title] = "Nushell"
  16. options[:attribution] = <<-HTML
  17. Copyright &copy; 2019–2023 The Nushell Project Developers
  18. Licensed under the MIT License.
  19. HTML
  20. # latest version has a special URL that does not include the version identifier
  21. version do
  22. self.base_urls = [
  23. "https://www.nushell.sh/book/",
  24. "https://www.nushell.sh/commands/"
  25. ]
  26. end
  27. def get_latest_version(opts)
  28. get_latest_github_release('nushell', 'nushell', opts)
  29. end
  30. end
  31. end