<% content_for :sidebar do %>
  <ul>

  <li><%= link_to 'By Team', '/apps/by-team.html' %></li>
  <li>
    <ul class='subnav'>
    <% renderer = TechDocsHTMLRenderer.new %>
    <% teams.each do |team_name| %>
      <li><%= link_to team_name, "/apps/by-team.html#" + renderer.githubify_fragment_id(team_name) %></li>
    <% end %>
    </ul>
  </li>

  <% active_app_pages.group_by(&:type).each do |name, apps| %>
    <li><%= link_to name, '/apps.html' %></li>

    <li>
      <ul class='subnav'>
      <% apps.each do |app| %>
        <li><%= sidebar_link app.app_name, "/apps/#{app.app_name}.html" %></li>
      <% end %>
      </ul>
    </li>
  <% end %>
  </ul>
<% end %>

<% wrap_layout :layout_with_sidebar do %>
  <%= partial 'partials/header' %>
  <%= yield %>
<% end %>

<% content_for :sidebar do %>
  <ul>

  <li><%= link_to 'By Team', '/apps/by-team.html' %></li>
  <li>
    <ul class='subnav'>
    <% renderer = DeveloperDocsRenderer.new %>
    <% teams.each do |team_name| %>
      <li><%= link_to team_name, "/apps/by-team.html#" + renderer.githubify_fragment_id(team_name) %></li>
    <% end %>
    </ul>
  </li>

  <% active_app_pages.group_by(&:type).each do |name, apps| %>
    <li><%= link_to name, '/apps.html' %></li>

    <li>
      <ul class='subnav'>
      <% apps.each do |app| %>
        <li><%= sidebar_link app.app_name, "/apps/#{app.app_name}.html" %></li>
      <% end %>
      </ul>
    </li>
  <% end %>
  </ul>
<% end %>

<% wrap_layout :layout_with_sidebar do %>
  <%= partial 'partials/header' %>
  <%= yield %>
<% end %>

Fix bug in apps page
Fix bug in apps page

The `githubify_fragment_id` functionality moved to the
`DeveloperDocsRenderer` class in
https://github.com/alphagov/govuk-developer-docs/pull/101.
