htmx.rb 827 B

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class Htmx < UrlScraper
  3. self.name = 'htmx'
  4. self.type = 'simple'
  5. self.slug = 'htmx'
  6. self.links = {
  7. home: 'https://htmx.org/',
  8. code: 'https://github.com/bigskysoftware/htmx'
  9. }
  10. self.release = '1.9.10'
  11. self.base_url = "https://htmx.org/"
  12. self.initial_paths = %w(reference/)
  13. html_filters.push 'htmx/entries', 'htmx/clean_html'
  14. options[:trailing_slash] = true
  15. options[:container] = '.content'
  16. options[:download_images] = false
  17. options[:skip_patterns] = [
  18. /\Aessays/,
  19. /\Aexamples/,
  20. /\Amigration-guide/,
  21. /\Aposts/,
  22. ]
  23. # https://github.com/bigskysoftware/htmx/blob/master/LICENSE
  24. options[:attribution] = <<-HTML
  25. Licensed under the Zero-Clause BSD
  26. HTML
  27. def get_latest_version(opts)
  28. get_npm_version('htmx.org', opts)
  29. end
  30. end
  31. end