mirror of https://github.com/freeCodeCamp/devdocs
parent
338ac78f05
commit
621ac0a350
@ -1,6 +1,6 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Yii1
|
class Yii
|
||||||
class CleanHtmlFilter < Filter
|
class CleanHtmlV1Filter < Filter
|
||||||
def call
|
def call
|
||||||
at_css('h1').content = 'Yii PHP Framework' if root_page?
|
at_css('h1').content = 'Yii PHP Framework' if root_page?
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Yii
|
class Yii
|
||||||
class CleanHtmlFilter < Filter
|
class CleanHtmlV2Filter < Filter
|
||||||
def call
|
def call
|
||||||
css('.hashlink[name]').each do |node|
|
css('.hashlink[name]').each do |node|
|
||||||
node.parent['id'] = node['name']
|
node.parent['id'] = node['name']
|
@ -1,6 +1,6 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Yii1
|
class Yii
|
||||||
class EntriesFilter < Docs::EntriesFilter
|
class EntriesV1Filter < Docs::EntriesFilter
|
||||||
def get_name
|
def get_name
|
||||||
at_css('h1').content.strip
|
at_css('h1').content.strip
|
||||||
end
|
end
|
@ -1,6 +1,6 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Yii
|
class Yii
|
||||||
class EntriesFilter < Docs::EntriesFilter
|
class EntriesV2Filter < Docs::EntriesFilter
|
||||||
def get_name
|
def get_name
|
||||||
name = at_css('h1').content.strip
|
name = at_css('h1').content.strip
|
||||||
name.remove! %r{\A.*?(Class|Trait|Interface)\s*}
|
name.remove! %r{\A.*?(Class|Trait|Interface)\s*}
|
@ -1,18 +1,30 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Yii < UrlScraper
|
class Yii < UrlScraper
|
||||||
self.type = 'yii'
|
self.type = 'yii'
|
||||||
self.release = '2.0.2'
|
|
||||||
|
options[:attribution] = <<-HTML
|
||||||
|
© 2008–2016 by Yii Software LLC<br>
|
||||||
|
Licensed under the three clause BSD license.
|
||||||
|
HTML
|
||||||
|
|
||||||
|
version '2.0' do
|
||||||
|
self.release = '2.0.6'
|
||||||
self.base_url = 'http://www.yiiframework.com/doc-2.0/'
|
self.base_url = 'http://www.yiiframework.com/doc-2.0/'
|
||||||
self.root_path = 'index.html'
|
self.root_path = 'index.html'
|
||||||
|
|
||||||
html_filters.push 'yii/clean_html', 'yii/entries'
|
html_filters.push 'yii/clean_html_v2', 'yii/entries_v2'
|
||||||
|
|
||||||
options[:container] = 'div[role=main]'
|
options[:container] = 'div[role=main]'
|
||||||
options[:skip_patterns] = [/\Ayii-apidoc/]
|
options[:skip_patterns] = [/\Ayii-apidoc/]
|
||||||
|
end
|
||||||
|
|
||||||
options[:attribution] = <<-HTML
|
version '1.1' do
|
||||||
© 2008–2015 by Yii Software LLC<br>
|
self.release = '1.1.17'
|
||||||
Licensed under the three clause BSD license.
|
self.base_url = 'http://www.yiiframework.com/doc/api/1.1/'
|
||||||
HTML
|
|
||||||
|
html_filters.push 'yii/clean_html_v1', 'yii/entries_v1'
|
||||||
|
|
||||||
|
options[:container] = '.grid_9'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
module Docs
|
|
||||||
class Yii1 < UrlScraper
|
|
||||||
self.name = 'Yii 1'
|
|
||||||
self.slug = 'yii1'
|
|
||||||
self.type = 'yii'
|
|
||||||
self.release = '1.1.16'
|
|
||||||
self.base_url = 'http://www.yiiframework.com/doc/api/1.1/'
|
|
||||||
|
|
||||||
html_filters.push 'yii1/clean_html', 'yii1/entries'
|
|
||||||
|
|
||||||
options[:container] = '.grid_9'
|
|
||||||
options[:attribution] = <<-HTML
|
|
||||||
© 2008–2015 by Yii Software LLC<br>
|
|
||||||
Licensed under the three clause BSD license.
|
|
||||||
HTML
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in new issue