add search entries

pull/2375/head
Gergely Gombos 1 month ago
parent afd18f66af
commit 70c5489f52

@ -24,6 +24,18 @@ module Docs
canary_copy = '- This feature is available in the latest Canary'
return string.sub(canary_copy, ' (Canary)')
end
def additional_entries
excluded = %w(usage troubleshooting recap reference challenges alternatives)
entries = []
css('article h2, article h3').map do |node|
next unless node.has_attribute?('id')
name = node.content.strip
next if excluded.include?(name.downcase)
entries << [name, node['id'], type]
end
return entries
end
end
end
end

Loading…
Cancel
Save