Unified · Split
| @@ -4,17 +4,13 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | class Cypress |
| 5 | 5 | class CleanHtmlFilter < Filter |
| 6 | 6 | def call |
| 7 | − article_div = at_css('#article > div') | |
| 8 | − @doc = article_div unless article_div.nil? | |
| 9 | 7 | |
| 10 | − header = at_css('h1.article-title') | |
| 11 | − doc.prepend_child(header) unless header.nil? | |
| 12 | − | |
| 13 | − css('.article-edit-link').remove | |
| 14 | − css('.article-footer').remove | |
| 15 | − css('.article-footer-updated').remove | |
| 8 | + css('div[role=alert]').each do |node| | |
| 9 | + node.name = 'blockquote' | |
| 10 | + node.add_class('note info') | |
| 11 | + end | |
| 16 | 12 | |
| 17 | − css('.dashboard-ad').remove | |
| 13 | + css('footer').remove | |
| 18 | 14 | |
| 19 | 15 | css('pre').each do |node| |
| 20 | 16 | node.content = node.content |
| @@ -17,7 +17,7 @@ module Docs · 16 unmodified lines | ||
| 17 | 17 | ].freeze |
| 18 | 18 | |
| 19 | 19 | def get_name |
| 20 | − at_css('h1.article-title').content.strip | |
| 20 | + at_css('h1.main-content-title').content.strip | |
| 21 | 21 | end |
| 22 | 22 | |
| 23 | 23 | def get_type |
| @@ -4,9 +4,9 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | class Cypress < UrlScraper |
| 5 | 5 | self.name = 'Cypress' |
| 6 | 6 | self.type = 'cypress' |
| 7 | − self.release = '6.8.0' | |
| 7 | + self.release = '7.2.0' | |
| 8 | 8 | self.base_url = 'https://docs.cypress.io' |
| 9 | − self.root_path = '/api/api/table-of-contents.html' | |
| 9 | + self.root_path = '/api/table-of-contents.html' | |
| 10 | 10 | self.links = { |
| 11 | 11 | home: 'https://www.cypress.io/', |
| 12 | 12 | code: 'https://github.com/cypress-io/cypress', |
| @@ -14,7 +14,7 @@ module Docs · 1 unmodified line | ||
| 14 | 14 | |
| 15 | 15 | html_filters.push 'cypress/entries', 'cypress/clean_html' |
| 16 | 16 | |
| 17 | − options[:container] = '#content' | |
| 17 | + options[:container] = 'article' | |
| 18 | 18 | options[:max_image_size] = 300_000 |
| 19 | 19 | options[:include_default_entry] = true |
| 20 | 20 | |