mirror of https://github.com/freeCodeCamp/devdocs
parent
4a72a972df
commit
fd203212ac
@ -1,26 +1,32 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Html < Mdn
|
class Html < Mdn
|
||||||
self.name = 'HTML'
|
self.name = 'HTML'
|
||||||
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element'
|
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML'
|
||||||
|
self.root_path = '/Element'
|
||||||
|
self.initial_paths = %w(/Attributes)
|
||||||
|
|
||||||
html_filters.push 'html/clean_html', 'html/entries', 'title'
|
html_filters.push 'html/clean_html', 'html/entries', 'title'
|
||||||
|
|
||||||
options[:root_title] = 'HTML'
|
options[:root_title] = 'HTML'
|
||||||
|
|
||||||
options[:title] = ->(filter) do
|
options[:title] = ->(filter) do
|
||||||
if filter.slug == 'Heading_Elements'
|
if filter.slug == 'Element/Heading_Elements'
|
||||||
'Heading Elements'
|
'Heading Elements'
|
||||||
|
elsif filter.slug == 'Attributes'
|
||||||
|
'Attributes'
|
||||||
else
|
else
|
||||||
"<#{filter.default_title}>"
|
"<#{filter.default_title}>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
options[:only_patterns] = [/\A\/Element/]
|
||||||
|
|
||||||
options[:replace_paths] = {
|
options[:replace_paths] = {
|
||||||
'/h1' => '/Heading_Elements',
|
'/Element/h1' => '/Element/Heading_Elements',
|
||||||
'/h2' => '/Heading_Elements',
|
'/Element/h2' => '/Element/Heading_Elements',
|
||||||
'/h3' => '/Heading_Elements',
|
'/Element/h3' => '/Element/Heading_Elements',
|
||||||
'/h4' => '/Heading_Elements',
|
'/Element/h4' => '/Element/Heading_Elements',
|
||||||
'/h5' => '/Heading_Elements',
|
'/Element/h5' => '/Element/Heading_Elements',
|
||||||
'/h6' => '/Heading_Elements' }
|
'/Element/h6' => '/Element/Heading_Elements' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue