Просмотр исходного кода

Update Marionette documentation (2.4.1)

Thibaut 10 лет назад
Родитель
Сommit
2bbb35b7da

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -207,7 +207,7 @@ credits = [
     'http://www.lua.org/license.html'
   ], [
     'Marionette.js',
-    '2014 Muted Solutions, LLC',
+    '2015 Muted Solutions, LLC',
     'MIT',
     'http://mutedsolutions.mit-license.org/'
   ], [

+ 1 - 0
assets/stylesheets/pages/_marionette.scss

@@ -4,4 +4,5 @@
   > h1, > h2 { margin-left: -1rem; }
   > h2 { @extend %block-heading; }
   > h3 { @extend %block-label, %label-blue; }
+  blockquote { @extend %note; }
 }

+ 1 - 0
lib/docs/filters/marionette/clean_html.rb

@@ -8,6 +8,7 @@ module Docs
 
       def root
         at_css('p').remove
+        at_css('h1').content = 'Backbone.Marionette'
       end
 
       def other

+ 5 - 13
lib/docs/scrapers/marionette.rb

@@ -3,24 +3,16 @@ module Docs
     self.name = 'Marionette.js'
     self.slug = 'marionette'
     self.type = 'marionette'
-    self.version = '2.3.0'
-    self.base_url = 'http://marionettejs.com/docs/'
-    self.root_path = 'current'
+    self.version = '2.4.1'
+    self.base_url = "http://marionettejs.com/docs/v#{version}/"
+    self.root_path = 'index'
 
     html_filters.push 'marionette/clean_html', 'marionette/entries'
 
-    options[:container] = '#content'
-
-    options[:skip] = %w(/readme.html)
-    options[:skip_patterns] = [/\A\/v\d/]
-
-    options[:fix_urls] = ->(url) do
-      url.sub! %r{marionette([^\/#\?]*)\.md}, 'marionette\1'
-      url
-    end
+    options[:container] = '.docs__content'
 
     options[:attribution] = <<-HTML
-      &copy; 2014 Muted Solutions, LLC<br>
+      &copy; 2015 Muted Solutions, LLC<br>
       Licensed under the MIT License.
     HTML
   end