zig.rb 639 B

12345678910111213141516171819202122232425
  1. module Docs
  2. class Zig < UrlScraper
  3. self.name = 'Zig'
  4. self.type = 'simple'
  5. self.release = '0.11.0'
  6. self.base_url = "https://ziglang.org/documentation/#{self.release}/"
  7. self.links = {
  8. home: 'https://ziglang.org/',
  9. code: 'https://github.com/ziglang/zig'
  10. }
  11. html_filters.push 'zig/entries', 'zig/clean_html'
  12. options[:follow_links] = false
  13. options[:attribution] = <<-HTML
  14. &copy; 2015–2023, Zig contributors<br>
  15. Licensed under the MIT License.
  16. HTML
  17. def get_latest_version(opts)
  18. tags = get_github_tags('ziglang', 'zig', opts)
  19. tags[0]['name']
  20. end
  21. end
  22. end