forked from freeCodeCamp/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeigniter.rb
55 lines (46 loc) · 1.28 KB
/
codeigniter.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module Docs
class Codeigniter < UrlScraper
self.name = 'CodeIgniter'
self.type = 'sphinx'
self.root_path = 'index.html'
self.links = {
home: 'https://codeigniter.com/',
code: 'https://github.com/bcit-ci/CodeIgniter'
}
html_filters.push 'codeigniter/entries', 'sphinx/clean_html'
options[:skip] = %w(
license.html
changelog.html
DCO.html
general/welcome.html
general/requirements.html
general/credits.html
libraries/index.html
helpers/index.html
)
options[:skip_patterns] = [
/\Acontributing/,
/\Adocumentation/,
/\Achangelogs/,
/\Ainstallation\/upgrade/
]
options[:attribution] = <<-HTML
© 2014–2021 British Columbia Institute of Technology<br>
Licensed under the MIT License.
HTML
version '4' do
self.release = '4.1.5'
self.base_url = 'https://codeigniter.com/user_guide/'
options[:container] = '.document > div'
end
version '3' do
self.release = '3.1.8'
self.base_url = 'https://codeigniter.com/userguide3/'
options[:container] = '.document'
end
def get_latest_version(opts)
tags = get_github_tags('codeigniter4', 'codeigniter4', opts)
tags[0]['name'][1..-1]
end
end
end