History

Update Laravel documentation (5.3.0, 5.2.31, 5.1.33)

Thibaut Courouble committed 10 years ago

Commit 155e1501 parent c7d253c3 files · +22 −3Browse files

Unified · Split

3 files
  1. assets/stylesheets/pages/_laravel.scss +2 −1
  2. lib/docs/filters/laravel/clean_html.rb +7 −2
  3. lib/docs/scrapers/laravel.rb +13 −0
assets/stylesheets/pages/_laravel.scss+2−1
@@ -4,5 +4,6 @@ · 3 unmodified lines
4 h4 { font-size: 1em; }4 h4 { font-size: 1em; }
5 5
6 blockquote { @extend %note; }6 blockquote { @extend %note; }
7 p > code { @extend %label; }7 blockquote.tip { @extend %note-blue; }
8 p > code, h4 > code { @extend %label; }
8}9}
lib/docs/filters/laravel/clean_html.rb+7−2
@@ -14,6 +14,10 @@ module Docs · 13 unmodified lines
14 node['data-language'] = 'php'14 node['data-language'] = 'php'
15 end15 end
16 16
17 css('a.__cf_email__').each do |node|
18 node.replace(decode_cloudflare_email(node['data-cfemail']))
19 end
20
17 doc21 doc
18 end22 end
19 23
@@ -67,8 +71,9 @@ module Docs · 47 unmodified lines
67 node.parent.next_element['id'] = node['name']71 node.parent.next_element['id'] = node['name']
68 end72 end
69 73
70 css('a.__cf_email__').each do |node|74 css('blockquote').each do |node|
71 node.replace(decode_cloudflare_email(node['data-cfemail']))75 node['class'] = 'tip' if node.inner_html.include?('{tip}')
76 node.inner_html = node.inner_html.remove(/\{(tip|note)\}\s?/)
72 end77 end
73 end78 end
74 end79 end
lib/docs/scrapers/laravel.rb+13−0
@@ -33,6 +33,19 @@ module Docs · 32 unmodified lines
33 Laravel is a trademark of Taylor Otwell.33 Laravel is a trademark of Taylor Otwell.
34 HTML34 HTML
35 35
36 version '5.3' do
37 self.release = '5.3.0'
38 self.root_path = '/api/5.3/index.html'
39 self.initial_paths = %w(/docs/5.3/installation /api/5.3/classes.html)
40
41 options[:only_patterns] = [%r{\A/api/5\.3/}, %r{\A/docs/5\.3/}]
42
43 options[:fix_urls] = ->(url) do
44 url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/5.3/"
45 url
46 end
47 end
48
36 version '5.2' do49 version '5.2' do
37 self.release = '5.2.31'50 self.release = '5.2.31'
38 self.root_path = '/api/5.2/index.html'51 self.root_path = '/api/5.2/index.html'