laravel.rb 972 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. module Docs
  2. class Laravel < UrlScraper
  3. self.name = 'Laravel'
  4. self.slug = 'laravel'
  5. self.type = 'laravel'
  6. self.version = '4.1.29'
  7. self.base_url = 'http://laravel.com'
  8. self.root_path = '/docs/introduction'
  9. self.initial_paths = %w(/api/4.1/namespaces.html)
  10. html_filters.push 'laravel/entries', 'laravel/clean_html'
  11. options[:container] = ->(filter) {
  12. filter.subpath.start_with?('/api') ? nil : '#documentation > article'
  13. }
  14. options[:only_patterns] = [
  15. /\A\/api\/4\.1\//,
  16. /\A\/docs\//]
  17. options[:skip] = %w(
  18. /docs/quick
  19. /docs/releases
  20. /docs/upgrade
  21. /docs/artisan
  22. /docs/commands
  23. /api/4.1/panel.html
  24. /api/4.1/classes.html
  25. /api/4.1/interfaces.html
  26. /api/4.1/traits.html
  27. /api/4.1/doc-index.html
  28. /api/4.1/Illuminate.html)
  29. options[:attribution] = <<-HTML
  30. &copy; Taylor Otwell<br>
  31. Licensed under the MIT License.
  32. HTML
  33. end
  34. end