|
|
@ -8,7 +8,6 @@ module Docs
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
TYPE_BY_DIRECTORY = {
|
|
|
|
TYPE_BY_DIRECTORY = {
|
|
|
|
'get-started' => 'Getting Started',
|
|
|
|
|
|
|
|
'concepts' => 'Concepts',
|
|
|
|
'concepts' => 'Concepts',
|
|
|
|
'guides' => 'Guides',
|
|
|
|
'guides' => 'Guides',
|
|
|
|
'api' => 'API',
|
|
|
|
'api' => 'API',
|
|
|
@ -23,8 +22,9 @@ module Docs
|
|
|
|
|
|
|
|
|
|
|
|
def additional_entries
|
|
|
|
def additional_entries
|
|
|
|
if slug.start_with?('configuration')
|
|
|
|
if slug.start_with?('configuration')
|
|
|
|
css('h2[id] code').map do |node|
|
|
|
|
css('h2[id] code').each_with_object [] do |node, entries|
|
|
|
|
[node.content, node.parent['id']]
|
|
|
|
next if node.previous.try(:content).present?
|
|
|
|
|
|
|
|
entries << [node.content, node.parent['id']]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
elsif slug.start_with?('api')
|
|
|
|
elsif slug.start_with?('api')
|
|
|
|
css('.header[id] code').each_with_object [] do |node, entries|
|
|
|
|
css('.header[id] code').each_with_object [] do |node, entries|
|
|
|
|