<% if false %> This is a comment! Implement canonical links https://gitlab.com/gitlab-org/gitlab-docs/issues/167 We want to: - All index.html and README.html files stripped - Replace ce/ with ee/ ------------------ if the link ends with README.md or index.md if the link starts with ce replace it with ee and strip README.md or index.md if the link doesn't start with ce strip README.md or index.md if the link doesn't end with README.md or index.md if the link starts with ce replace it with ee if the link doesn't start with ce use its initial path <% end %> <% if production? %> <% if (@item.identifier =~ /(index|README)\.md$/) == 0 %> <% if @item.identifier.to_s.split('/')[1] == 'ce' %> <% else %> <% end %> <% else %> <% if @item.identifier.to_s.split('/')[1] == 'ce' %> <% elsif @item.identifier.to_s == '/index.erb' %> <% else %> <% end %> <% end %> <% end %>