<% Dir.entries(@dir_to_list || dir_to_list).each do |dir| %>
  <% unless dir == '.' || dir == '..' then %>
    <div>
      <a href="<%= "#{@context}/#{dir.gsub(".md",".html")}" %>">
        <%# .to_s stops errors about void variable %>
        <%= dir.to_s %>
      </a>
    </div>
    <% end %>
<% end %>

<% Dir.entries(@dir_to_list || dir_to_list).each do |dir| %>
  <% unless dir == '.' || dir == '..' then %>
    <div>
      <a href="<%= "#{@context}/#{dir.gsub(".md",".html")}" %>">
        <%# .to_s stops errors about void variable %>
        <%= dir.gsub(".md","") %>
      </a>
    </div>
    <% end %>
<% end %>

Remove .md extension from link body
Remove .md extension from link body

This will help to confuse visitors of the page less.
