1
0

koa.rb 922 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # frozen_string_literal: true
  2. module Docs
  3. class Koa < Github
  4. self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'
  5. self.release = '2.6.1'
  6. self.root_path = 'api/index.md'
  7. self.initial_paths = %w[
  8. error-handling
  9. faq
  10. guide
  11. koa-vs-express
  12. migration
  13. troubleshooting
  14. api/index
  15. api/context
  16. api/request
  17. api/response
  18. ].map { |name| name + '.md' }
  19. self.links = {
  20. home: 'https://koajs.com/',
  21. code: 'https://github.com/koajs/koa'
  22. }
  23. html_filters.push 'koa/clean_html', 'koa/entries'
  24. options[:skip] = %w[middleware.gif]
  25. options[:trailing_slash] = false
  26. options[:container] = '.markdown-body'
  27. options[:attribution] = <<-HTML
  28. &copy; 2018 Koa contributors<br>
  29. Licensed under the MIT License.
  30. HTML
  31. def get_latest_version(opts)
  32. get_npm_version('koa', opts)
  33. end
  34. end
  35. end