Simplify nokogiri2/attribution

pull/1692/head
Simon Legner 3 years ago
parent 6af0eb4e50
commit efd45d5961

@ -1,12 +0,0 @@
# frozen_string_literal: true
module Docs
class Nokogiri2
class AttributionFilter < Docs::AttributionFilter
def attribution_link
url = current_url.to_s.sub! 'http://localhost', 'https://nokogiri.org/rdoc'
%(<a href="#{url}" class="_attribution-link">#{url}</a>)
end
end
end
end

@ -8,9 +8,9 @@ module Docs
self.name = 'Nokogiri' self.name = 'Nokogiri'
self.slug = 'nokogiri' self.slug = 'nokogiri'
self.release = '1.13.0' self.release = '1.13.0'
self.base_url = "https://nokogiri.org/rdoc/"
html_filters.replace 'rdoc/entries', 'nokogiri2/entries' html_filters.replace 'rdoc/entries', 'nokogiri2/entries'
text_filters.replace 'attribution', 'nokogiri2/attribution'
options[:root_title] = 'Nokogiri' options[:root_title] = 'Nokogiri'
options[:only_patterns] = [/\ANokogiri/, /\AXSD/] options[:only_patterns] = [/\ANokogiri/, /\AXSD/]

Loading…
Cancel
Save