Browse Source

Improve Grunt scraper

Thibaut Courouble 8 years ago
parent
commit
9d53de6a59

+ 0 - 8
assets/javascripts/views/pages/javascript.coffee

@@ -1,10 +1,5 @@
 #= require views/pages/base
 
-class app.views.JavascriptPage extends app.views.BasePage
-  prepare: ->
-    @highlightCode @findAllByTag('pre'), 'javascript'
-    return
-
 class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
   prepare: ->
     for el in @findAllByTag('pre')
@@ -15,9 +10,6 @@ class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
       @highlightCode el, language
     return
 
-app.views.GruntPage =
-app.views.JavascriptPage
-
 app.views.DojoPage =
 app.views.RequirejsPage =
 app.views.JavascriptWithMarkupCheckPage

+ 1 - 0
assets/javascripts/views/pages/simple.coffee

@@ -30,6 +30,7 @@ app.views.ExpressPage =
 app.views.FlowPage =
 app.views.GithubPage =
 app.views.GoPage =
+app.views.GruntPage =
 app.views.ImmutablePage =
 app.views.InfluxdataPage =
 app.views.JasminePage =

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

@@ -19,6 +19,7 @@ module Docs
         # Remove code highlighting
         css('pre').each do |node|
           node.content = node.content
+          node['data-language'] = 'javascript'
         end
 
         doc

+ 1 - 1
lib/docs/scrapers/grunt.rb

@@ -3,7 +3,7 @@ module Docs
     self.name = 'Grunt'
     self.type = 'grunt'
     self.release = '1.0.1'
-    self.base_url = 'http://gruntjs.com/'
+    self.base_url = 'https://gruntjs.com/'
     self.root_path = 'getting-started'
     self.initial_paths = %w(api/grunt)