find_section

in lib/helpers/generic.rb [80:97]


    def find_section(title, path)
      return "Tutorials" if title.start_with?("Tutorial:")

      path = path[1..] 

      get_nav_sections.each do |section|
        section_title = section[:section_title]
        return section_title if section[:section_url] == path

        section.fetch(:section_categories, []).each do |category|
          return section_title if category[:category_url] == path
          next unless category[:docs]
          return section_title if section_exists?(category[:docs], path)
        end
      end
      "none"
    end