Index HTML link types

pull/129/head
Thibaut 11 years ago
parent fd203212ac
commit d1920bc05c

@ -27,7 +27,7 @@ module Docs
end
def include_default_entry?
!%w(Attributes Element/Heading_Elements).include?(slug)
!%w(Attributes Link_types Element/Heading_Elements).include?(slug)
end
def additional_entries
@ -39,6 +39,13 @@ module Docs
id = node.parent['id'] = name.parameterize
[name, id, 'Attributes']
end
elsif slug == 'Link_types'
css('.standard-table td:first-child > code').map do |node|
name = node.content.strip
id = node.parent.parent['id'] = name.parameterize
name.prepend 'rel: '
[name, id, 'Attributes']
end
else
[]
end

@ -3,7 +3,7 @@ module Docs
self.name = 'HTML'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML'
self.root_path = '/Element'
self.initial_paths = %w(/Attributes)
self.initial_paths = %w(/Attributes /Link_types)
html_filters.push 'html/clean_html', 'html/entries', 'title'
@ -14,6 +14,8 @@ module Docs
'Heading Elements'
elsif filter.slug == 'Attributes'
'Attributes'
elsif filter.slug == 'Link_types'
'Link types'
else
"<#{filter.default_title}>"
end

Loading…
Cancel
Save