File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ module Docs
22 class Cyclejs
33 class CleanHtmlFilter < Filter
44 def call
5+ return "<h1>Cycle.js</h1><p>A functional and reactive JavaScript framework for predictable code</p>" if root_page?
56 css ( 'br' ) . remove
67
78 css ( 'pre > code' ) . each do |node |
89 parent = node . parent
9- if node [ 'class' ] && node [ 'class' ] =~ /language-(\w +)/
10- parent [ 'data-language' ] = Regexp . last_match ( 1 )
11- end
10+ parent [ 'data-language' ] = 'javascript'
1211 parent . content = node . content . strip
1312 end
1413
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ def get_name
66 name = title ? title . content . strip : subpath . sub ( /\. html\z / , '' ) . titleize
77 name = 'Cycle.js' if root_page?
88 name = 'API Reference' if slug == 'api/index'
9+ name . delete_suffix! ' - source'
910 name
1011 end
1112
@@ -18,7 +19,7 @@ def additional_entries
1819 name = node . content . strip
1920 name . sub! ( /\A #\s */ , '' )
2021 name . sub! ( /\s +#\z / , '' )
21- [ name , node [ 'id' ] ]
22+ [ get_name + ': ' + name , node [ 'id' ] ]
2223 end
2324 end
2425 end
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class Cyclejs < UrlScraper
4949 /\A api\/ /
5050 ]
5151
52+ options [ :download_images ] = false
5253 options [ :attribution ] = <<-HTML
5354 © 2014–present Cycle.js contributors.< br >
5455 Licensed under the MIT License.
You can’t perform that action at this time.
0 commit comments