Commit 1d60c0feb0fe6785aae4e10a1556b2eb441e4de3

Added norobots meta content (put norobots at top of a page to stop it being indexed)

Commit diff

app/helpers/application_helper.rb

 
105105 end
106106 end
107107
108
109 # Gitlab Specific
110 # There are probably better places to put a lot of these (individual helpers?)
111 #
112 #TODO move to library
113108 def title (page_title)
114109 content_for(:title) { page_title }
115110 end
116111
117112 def meta_description (text)
118 content_for(:meta_description, %Q{<meta name="#{text}" content="" />})
113 content_for(:meta_description, %Q{<meta name="description" content="#{text}" />})
119114 end
120115
116 def norobots
117 content_for(:norobots, %Q{<meta name="ROBOTS" content="NOINDEX">})
118 end
119
121120 def div_no_breadcrumb
122121 %Q{<div id='no_breadcrumb'></div>}
123122 end
toggle raw diff

app/views/commits/ac_show.html.erb

 
1<% norobots %>
2
13<%= render :partial => "projects/ac_project_header", :locals => { :tab => PRJ_TAB_REPOS, :subtab => PRJ_TAB_REPOS_COMMIT, :project => @project, :pagetitle => @title } %>
24
35<%= render :partial => "commit_infobox" -%>
toggle raw diff

app/views/layouts/application.html.erb

 
55<head>
66<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
77<%= yield(:meta_description) %>
8<%= yield(:norobots) %>
89<link rel="icon" href="/favicon.ico" type="image/ico">
910<link rel="shortcut icon" href="/favicon.ico">
1011<link rel='alternate' type='application/rss+xml' title='RSS Feed' href='/rss.xml'/>
toggle raw diff

public/robots.txt

 
88#Disallow: /projects/
99
1010User-agent: *
11Disallow: /projects/gitlab/repos/
11#Disallow: /projects/gitlab/repos/
toggle raw diff