Update D3.js documentation (6.5.0)

pull/1477/head
Simon Legner 4 years ago
parent 42803937f4
commit 86d23b7127

@ -223,7 +223,7 @@ credits = [
'https://raw.githubusercontent.com/dlang/phobos/master/LICENSE_1_0.txt' 'https://raw.githubusercontent.com/dlang/phobos/master/LICENSE_1_0.txt'
], [ ], [
'D3.js', 'D3.js',
'2010-2018 Michael Bostock', '2010-2020 Michael Bostock',
'BSD', 'BSD',
'https://raw.githubusercontent.com/d3/d3/master/LICENSE' 'https://raw.githubusercontent.com/d3/d3/master/LICENSE'
], [ ], [

@ -31,6 +31,9 @@ module Docs
node.content = 'Source' node.content = 'Source'
node['class'] = 'source' node['class'] = 'source'
end end
css('h6 a:contains("Source"), h6 a:contains("Examples")').each do |node|
node['class'] = 'source'
end
# Fix internal links # Fix internal links
css('a[href]').each do |node| css('a[href]').each do |node|

@ -18,8 +18,13 @@ module Docs
def additional_entries def additional_entries
css('h6[id]').each_with_object [] do |node, entries| css('h6[id]').each_with_object [] do |node, entries|
name = node.content.strip name = node.content.strip
name.remove! 'Source, Examples'
name.remove! 'Source' name.remove! 'Source'
name.remove! 'Examples'
name.remove! '<>' name.remove! '<>'
name.remove! ' · '
name.remove! '0,' # from d3.quickselect
name.remove! '=' # from d3.quickselect
name.remove! %r{\s\-.*} name.remove! %r{\s\-.*}
name.remove! %r{\s*\[.*\]} name.remove! %r{\s*\[.*\]}
name.gsub! %r{\(.+?\)\)?}, '()' name.gsub! %r{\(.+?\)\)?}, '()'

@ -12,10 +12,26 @@ module Docs
options[:container] = '.markdown-body' options[:container] = '.markdown-body'
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2010&ndash;2018 Michael Bostock<br> &copy; 2010&ndash;2020 Michael Bostock<br>
Licensed under the BSD License. Licensed under the BSD License.
HTML HTML
version '6' do
self.release = '6.5.0'
self.base_url = 'https://github.com/d3/'
self.root_path = 'd3/blob/master/API.md'
html_filters.push 'd3/clean_html', 'd3/entries_v4'
options[:only_patterns] = [/\Ad3[\-\w]+\z/, /\Ad3\/blob\/master\/changes\.md\z/i]
options[:skip_patterns] = [/3\.x-api-reference/]
options[:fix_urls] = ->(url) do
url.sub! %r{/blob/master/readme.md}i, ''
url
end
end
version '5' do version '5' do
self.release = '5.7.0' self.release = '5.7.0'
self.base_url = 'https://github.com/d3/' self.base_url = 'https://github.com/d3/'

Loading…
Cancel
Save