vue.rb 911 B

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class Vue < UrlScraper
  3. self.name = 'Vue.js'
  4. self.slug = 'vue'
  5. self.type = 'vue'
  6. self.links = {
  7. home: 'https://vuejs.org/',
  8. code: 'https://github.com/vuejs/vue'
  9. }
  10. html_filters.push 'vue/entries', 'vue/clean_html'
  11. options[:only_patterns] = [/guide\//, /api\//]
  12. options[:replace_paths] = { 'guide/' => 'guide/index.html' }
  13. options[:attribution] = <<-HTML
  14. &copy; 2013&ndash;2017 Evan You, Vue.js contributors<br>
  15. Licensed under the MIT License.
  16. HTML
  17. version '2' do
  18. self.release = '2.3.2'
  19. self.base_url = 'https://vuejs.org/v2/'
  20. self.root_path = 'guide/index.html'
  21. self.initial_paths = %w(api/)
  22. end
  23. version '1' do
  24. self.release = '1.0.28'
  25. self.base_url = 'https://v1.vuejs.org'
  26. self.root_path = '/guide/index.html'
  27. self.initial_paths = %w(/api/index.html)
  28. end
  29. end
  30. end