@@ -4,35 +4,58 @@ class Elixir < UrlScraper
4
4
5
5
self . name = 'Elixir'
6
6
self . type = 'elixir'
7
- self . root_path = 'api-reference .html'
7
+ self . root_path = 'introduction .html'
8
8
self . links = {
9
9
home : 'https://elixir-lang.org/' ,
10
10
code : 'https://github.com/elixir-lang/elixir'
11
11
}
12
12
13
13
html_filters . push 'elixir/clean_html' , 'elixir/entries' , 'title'
14
14
15
- options [ :container ] = -> ( filter ) {
16
- filter . current_url . path . start_with? ( '/getting-started' ) ? '#main' : '#content'
17
- }
15
+ options [ :container ] = '#content'
18
16
options [ :title ] = false
19
17
options [ :root_title ] = 'Elixir'
20
18
21
19
options [ :attribution ] = <<-HTML
22
- © 2012 Plataformatec < br >
20
+ © 2012-2024 The Elixir Team < br >
23
21
Licensed under the Apache License, Version 2.0.
24
22
HTML
25
23
26
24
def initial_urls
27
- [ "https://hexdocs.pm/elixir/#{ self . class . release } /api-reference .html" ,
25
+ [ "https://hexdocs.pm/elixir/#{ self . class . release } /introduction .html" ,
28
26
"https://hexdocs.pm/eex/#{ self . class . release } /EEx.html" ,
29
27
"https://hexdocs.pm/ex_unit/#{ self . class . release } /ExUnit.html" ,
30
28
"https://hexdocs.pm/iex/#{ self . class . release } /IEx.html" ,
31
29
"https://hexdocs.pm/logger/#{ self . class . release } /Logger.html" ,
32
- "https://hexdocs.pm/mix/#{ self . class . release } /Mix.html" ,
33
- "https://elixir-lang.org/getting-started/introduction.html" ]
30
+ "https://hexdocs.pm/mix/#{ self . class . release } /Mix.html" ]
31
+ end
32
+
33
+ version '1.17' do
34
+ self . release = '1.17.2'
35
+ self . base_urls = [
36
+ "https://hexdocs.pm/elixir/#{ release } /" ,
37
+ "https://hexdocs.pm/eex/#{ release } /" ,
38
+ "https://hexdocs.pm/ex_unit/#{ release } /" ,
39
+ "https://hexdocs.pm/iex/#{ release } /" ,
40
+ "https://hexdocs.pm/logger/#{ release } /" ,
41
+ "https://hexdocs.pm/mix/#{ release } /"
42
+ ]
34
43
end
35
44
45
+ version '1.16' do
46
+ self . release = '1.16.3'
47
+ self . base_urls = [
48
+ "https://hexdocs.pm/elixir/#{ release } /" ,
49
+ "https://hexdocs.pm/eex/#{ release } /" ,
50
+ "https://hexdocs.pm/ex_unit/#{ release } /" ,
51
+ "https://hexdocs.pm/iex/#{ release } /" ,
52
+ "https://hexdocs.pm/logger/#{ release } /" ,
53
+ "https://hexdocs.pm/mix/#{ release } /"
54
+ ]
55
+ end
56
+
57
+ # scraping of older versions is no longer supported!
58
+
36
59
version '1.15' do
37
60
self . release = '1.15.4'
38
61
self . base_urls = [
0 commit comments