Unified · Split
| @@ -56,6 +56,7 @@ · 55 unmodified lines | |||
| 56 | 'pages/go', | 56 | 'pages/go', |
| 57 | 'pages/haskell', | 57 | 'pages/haskell', |
| 58 | 'pages/jquery', | 58 | 'pages/jquery', |
| 59 | 'pages/jsdoc', | ||
| 59 | 'pages/julia', | 60 | 'pages/julia', |
| 60 | 'pages/knockout', | 61 | 'pages/knockout', |
| 61 | 'pages/kotlin', | 62 | 'pages/kotlin', |
| @@ -0,0 +1,25 @@ | |||
| 1 | ._jsdoc { | ||
| 2 | > h2 { @extend %block-heading; } | ||
| 3 | |||
| 4 | > h3 { | ||
| 5 | @extend %lined-heading; | ||
| 6 | font-size: 1.1em; | ||
| 7 | } | ||
| 8 | |||
| 9 | figure { | ||
| 10 | margin-left: 0; | ||
| 11 | font-size: inherit; | ||
| 12 | |||
| 13 | pre { | ||
| 14 | margin-bottom: 0.5em; | ||
| 15 | } | ||
| 16 | |||
| 17 | figcaption { | ||
| 18 | font-style: italic; | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | pre { | ||
| 23 | font-size: inherit; | ||
| 24 | } | ||
| 25 | } | ||
| @@ -0,0 +1,43 @@ | |||
| 1 | module Docs | ||
| 2 | class Jsdoc | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | css('h2').each do |node| | ||
| 6 | next unless node.content.strip == 'Table of Contents' | ||
| 7 | toc_ul = node.next_element | ||
| 8 | toc_block = node.add_next_sibling('<nav class="_toc" role="directory"></nav>').first | ||
| 9 | |||
| 10 | node.name = 'h3' | ||
| 11 | node['class'] = '_toc-title' | ||
| 12 | node.remove | ||
| 13 | toc_block.add_child(node) | ||
| 14 | |||
| 15 | toc_ul.remove | ||
| 16 | toc_ul['class'] = '_toc-list' | ||
| 17 | toc_ul.css('ul').each do |child_list| | ||
| 18 | child_list.remove | ||
| 19 | end | ||
| 20 | toc_block.add_child(toc_ul) | ||
| 21 | end | ||
| 22 | |||
| 23 | css('.prettyprint').each do |node| | ||
| 24 | match = /lang-(\w+)/.match(node['class']) | ||
| 25 | next unless match | ||
| 26 | |||
| 27 | lang = match[1] | ||
| 28 | node.remove_attribute('class') | ||
| 29 | node['data-language'] = lang | ||
| 30 | end | ||
| 31 | |||
| 32 | css('figure').each do |node| | ||
| 33 | caption = node.at_css 'figcaption' | ||
| 34 | next unless caption | ||
| 35 | |||
| 36 | node.children.last.add_next_sibling(caption) | ||
| 37 | end | ||
| 38 | |||
| 39 | doc | ||
| 40 | end | ||
| 41 | end | ||
| 42 | end | ||
| 43 | end | ||
| @@ -0,0 +1,25 @@ | |||
| 1 | module Docs | ||
| 2 | class Jsdoc | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def get_name | ||
| 5 | at_css('h1').content | ||
| 6 | end | ||
| 7 | def get_type | ||
| 8 | case slug | ||
| 9 | when /^about-/ | ||
| 10 | 'Getting Started' | ||
| 11 | when /^plugins-/ | ||
| 12 | 'Plugins' | ||
| 13 | when /^howto-/ | ||
| 14 | 'Examples' | ||
| 15 | when /^tags-inline-/ | ||
| 16 | 'Inline Tags' | ||
| 17 | when /^tags-/ | ||
| 18 | 'Tags' | ||
| 19 | else | ||
| 20 | 'Other' # Only shown if a new category gets added in the upstream docs | ||
| 21 | end | ||
| 22 | end | ||
| 23 | end | ||
| 24 | end | ||
| 25 | end | ||
| @@ -0,0 +1,30 @@ | |||
| 1 | module Docs | ||
| 2 | class Jsdoc < UrlScraper | ||
| 3 | self.name = 'JSDoc' | ||
| 4 | self.type = 'jsdoc' | ||
| 5 | self.release = '3.5.5' | ||
| 6 | self.base_url = 'http://usejsdoc.org/' | ||
| 7 | self.links = { | ||
| 8 | home: 'http://usejsdoc.org/', | ||
| 9 | code: 'https://github.com/jsdoc3/jsdoc' | ||
| 10 | } | ||
| 11 | |||
| 12 | html_filters.push 'jsdoc/clean_html', 'jsdoc/entries' | ||
| 13 | |||
| 14 | options[:trailing_slash] = false | ||
| 15 | options[:container] = 'article' | ||
| 16 | options[:skip] = [ | ||
| 17 | 'about-license-jsdoc3.html' | ||
| 18 | ] | ||
| 19 | options[:attribution] = <<-HTML | ||
| 20 | © 2011–2017 | ||
| 21 | <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors"> | ||
| 22 | JSDoc 3 contributors | ||
| 23 | </a><br> | ||
| 24 | Licensed under | ||
| 25 | <a href="http://creativecommons.org/licenses/by-sa/3.0/"> | ||
| 26 | CC BY-SA 3.0 | ||
| 27 | </a> | ||
| 28 | HTML | ||
| 29 | end | ||
| 30 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://avatars2.githubusercontent.com/u/1530630 | ||