瀏覽代碼

Update Phalcon documentation (2.0.10)

Thibaut Courouble 9 年之前
父節點
當前提交
a2c93dd5fc

+ 0 - 7
assets/javascripts/views/pages/phalcon.coffee

@@ -1,7 +0,0 @@
-#= require views/pages/base
-
-class app.views.PhalconPage extends app.views.BasePage
-  prepare: ->
-    @highlightCode @findAll('pre[class*="php"]'), 'php'
-    @highlightCode @findAll('pre.highlight-html'), 'markup'
-    return

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

@@ -19,6 +19,7 @@ app.views.MomentPage =
 app.views.MongoosePage =
 app.views.NodePage =
 app.views.PerlPage =
+app.views.PhalconPage =
 app.views.PhaserPage =
 app.views.PostgresPage =
 app.views.RamdaPage =

+ 2 - 0
lib/docs/filters/phalcon/clean_html.rb

@@ -28,6 +28,8 @@ module Docs
           code.remove! %r{\A\s*<\?php\s*} unless code.include?(' ?>')
           node.content = code
           node.name = 'pre'
+          node['data-language'] = node['class'][/highlight-(\w+)/, 1]
+          node['data-language'] = 'php' if node['data-language'] == 'html+php'
         end
 
         css('.section').each do |node|

+ 1 - 1
lib/docs/filters/phalcon/entries.rb

@@ -10,7 +10,7 @@ module Docs
           'Guides'
         else
           path = name.split('\\')
-          path[1] == 'Mvc' ? path[1..2].join('\\') : path[1]
+          path[0] == 'Mvc' ? path[0..1].join('\\') : path[0]
         end
       end
 

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

@@ -1,7 +1,7 @@
 module Docs
   class Phalcon < UrlScraper
     self.type = 'phalcon'
-    self.release = '2.0.6'
+    self.release = '2.0.10'
     self.base_url = 'https://docs.phalconphp.com/en/latest/'
     self.root_path = 'index.html'
     self.links = {