diff --git a/assets/images/docs.png b/assets/images/docs.png index 7f64813a..0eaa66ad 100644 Binary files a/assets/images/docs.png and b/assets/images/docs.png differ diff --git a/assets/images/docs@2x.png b/assets/images/docs@2x.png index 7ae5052d..baad1b3c 100644 Binary files a/assets/images/docs@2x.png and b/assets/images/docs@2x.png differ diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index bc7424be..4226d6ae 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2016-07-24", - "New documentation: Crystal" + "New documentations: Julia and Crystal" ], [ "2016-07-03", "New documentations: CMake and Matplotlib" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 784b5279..696efe7a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -255,6 +255,11 @@ credits = [ 'jQuery Foundation and other contributors', 'MIT', 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt' + ], [ + 'Julia', + '2009-2015 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors', + 'MIT', + 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md' ], [ 'Knockout.js', 'Steven Sanderson, the Knockout.js team, and other contributors', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index c377d7e6..d9bb1be7 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -131,6 +131,7 @@ ._icon-opentsdb:before { background-position: -4rem -8rem; } ._icon-q:before { background-position: -5rem -8rem; } ._icon-crystal:before { background-position: -6rem -8rem; @extend %darkIconFix !optional; } +._icon-julia:before { background-position: -7rem -8rem; @extend %darkIconFix !optional; } ._icon-react_native:before { background-position: 0 -9rem; } ._icon-phalcon:before { background-position: -1rem -9rem; } ._icon-matplotlib:before { background-position: -2rem -9rem; } diff --git a/lib/docs/filters/julia/clean_html.rb b/lib/docs/filters/julia/clean_html.rb new file mode 100644 index 00000000..2bf83f36 --- /dev/null +++ b/lib/docs/filters/julia/clean_html.rb @@ -0,0 +1,11 @@ +module Docs + class Julia + class CleanHtmlFilter < Filter + def call + @doc = at_css('.document .section') + + doc + end + end + end +end diff --git a/lib/docs/filters/julia/entries.rb b/lib/docs/filters/julia/entries.rb new file mode 100644 index 00000000..2a24e916 --- /dev/null +++ b/lib/docs/filters/julia/entries.rb @@ -0,0 +1,34 @@ +module Docs + class Julia + class EntriesFilter < Docs::EntriesFilter + def get_name + name = at_css('.document h1').content + name.remove! "\u{00B6}" + name + end + + def get_type + if slug.start_with?('manual') + 'Manual' + else + name + end + end + + def additional_entries + return [] unless slug.start_with?('stdlib') + entries = [] + + css('.function dt[id]').each do |node| + entries << [node['id'].remove('Base.') + '()', node['id']] + end + + css('.data dt[id]').each do |node| + entries << [node['id'].remove('Base.'), node['id']] + end + + entries + end + end + end +end diff --git a/lib/docs/scrapers/julia.rb b/lib/docs/scrapers/julia.rb new file mode 100644 index 00000000..05c56aa2 --- /dev/null +++ b/lib/docs/scrapers/julia.rb @@ -0,0 +1,20 @@ +module Docs + class Julia < UrlScraper + self.type = 'sphinx_simple' + self.release = '0.4.6' + self.base_url = 'http://docs.julialang.org/en/release-0.4/' + self.links = { + home: 'http://julialang.org/', + code: 'https://github.com/JuliaLang/julia' + } + + html_filters.push 'julia/entries', 'julia/clean_html', 'sphinx/clean_html' + + options[:only_patterns] = [/\Amanual\//, /\Astdlib\//] + + options[:attribution] = <<-HTML + © 2009–2015 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
+ Licensed under the MIT License. + HTML + end +end diff --git a/public/icons/docs/julia/16.png b/public/icons/docs/julia/16.png new file mode 100644 index 00000000..7f7d8bf4 Binary files /dev/null and b/public/icons/docs/julia/16.png differ diff --git a/public/icons/docs/julia/16@2x.png b/public/icons/docs/julia/16@2x.png new file mode 100644 index 00000000..4f712a9f Binary files /dev/null and b/public/icons/docs/julia/16@2x.png differ diff --git a/public/icons/docs/julia/SOURCE b/public/icons/docs/julia/SOURCE new file mode 100644 index 00000000..1f0e149f --- /dev/null +++ b/public/icons/docs/julia/SOURCE @@ -0,0 +1 @@ +http://julialang.org/favicon.ico