Unified · Split
| @@ -115,7 +115,6 @@ · 114 unmodified lines | ||
| 115 | 115 | 'pages/sanctuary', |
| 116 | 116 | 'pages/scala', |
| 117 | 117 | 'pages/sinon', |
| 118 | − 'pages/socketio', | |
| 119 | 118 | 'pages/sphinx', |
| 120 | 119 | 'pages/sphinx_simple', |
| 121 | 120 | 'pages/sqlite', |
| @@ -1,24 +0,0 @@ | ||
| 1 | −._socketio { | |
| 2 | − > h2 { @extend %block-heading; } | |
| 3 | − > h3 { @extend %block-label, %label-blue; } | |
| 4 | − > h2, > h3 { clear: both; } | |
| 5 | − h4 { font-size: 1em; } | |
| 6 | − | |
| 7 | − .ezcol-one-half { | |
| 8 | − margin: .5em 0 1.5em; | |
| 9 | − float: left; | |
| 10 | − width: 50%; | |
| 11 | − padding-right: .5em; | |
| 12 | − @extend %border-box; | |
| 13 | − | |
| 14 | − &.ezcol-last { | |
| 15 | − float: right; | |
| 16 | − padding: 0 0 0 .5em; | |
| 17 | − } | |
| 18 | − | |
| 19 | − > h4 { margin: 0 0 1em; } | |
| 20 | − > pre { margin: 1em 0 0; } | |
| 21 | − } | |
| 22 | − | |
| 23 | − code { @extend %label; } | |
| 24 | −} | |
| @@ -2,26 +2,30 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Socketio |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − @doc = at_css('article') | |
| 5 | + @doc = at_css('article .theme-doc-markdown') | |
| 6 | 6 | |
| 7 | 7 | css('p > br').each do |node| |
| 8 | 8 | node.remove unless node.next.content =~ /\s*\-/ |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | − # version documentation message | |
| 12 | − css('.warning').remove | |
| 11 | + css('header h1').each do |node| | |
| 12 | + node.parent.replace(node) | |
| 13 | + end | |
| 14 | + css('footer', 'aside').remove | |
| 13 | 15 | |
| 14 | − css('header', 'footer', 'aside').remove | |
| 16 | + css('.theme-doc-version-badge', '.theme-doc-toc-mobile', '.admonition-heading', '.hash-link').remove | |
| 15 | 17 | |
| 16 | 18 | css('pre').each do |node| |
| 17 | − if node.at_css('.line').nil? | |
| 18 | − node.content = node.content | |
| 19 | − else | |
| 20 | − node.content = node.css('.line').map(&:content).join("\n") | |
| 21 | − end | |
| 19 | + node.content = node.css('.token-line').map(&:content).join("\n") | |
| 20 | + node.remove_attribute('style') | |
| 22 | 21 | node['data-language'] = node.content =~ /\A\s*</ ? 'html' : 'javascript' |
| 22 | + node.ancestors('.theme-code-block').first.replace(node) | |
| 23 | 23 | end |
| 24 | 24 | |
| 25 | + css('.themedImage--dark_oUvU').remove | |
| 26 | + | |
| 27 | + css('*[class]').remove_attribute('class') | |
| 28 | + | |
| 25 | 29 | doc |
| 26 | 30 | end |
| 27 | 31 | end |
| @@ -2,13 +2,13 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Socketio < UrlScraper |
| 3 | 3 | self.name = 'Socket.IO' |
| 4 | 4 | self.slug = 'socketio' |
| 5 | − self.type = 'socketio' | |
| 5 | + self.type = 'sphinx' | |
| 6 | 6 | self.links = { |
| 7 | − home: 'http://socket.io/', | |
| 7 | + home: 'https://socket.io/', | |
| 8 | 8 | code: 'https://github.com/socketio/socket.io' |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | − html_filters.push 'socketio/clean_html', 'socketio/entries' | |
| 11 | + html_filters.push 'socketio/clean_html', 'socketio/entries', 'sphinx/clean_html' | |
| 12 | 12 | |
| 13 | 13 | options[:trailing_slash] = false |
| 14 | 14 | options[:skip] = %w(/faq /glossary) |
| @@ -19,7 +19,7 @@ module Docs · 4 unmodified lines | ||
| 19 | 19 | HTML |
| 20 | 20 | |
| 21 | 21 | version '4' do |
| 22 | − self.release = '4.1.2' | |
| 22 | + self.release = '4.5.2' | |
| 23 | 23 | self.base_url = "https://socket.io/docs/v#{version}" |
| 24 | 24 | end |
| 25 | 25 | |