Commit 1d60c0feb0fe6785aae4e10a1556b2eb441e4de3
- Date: Fri May 02 09:24:06 +0000 2008
- Committer: mtkd (mtkd@prj2.com)
- Author: mtkd (mtkd@prj2.com)
- Commit SHA1: 1d60c0feb0fe6785aae4e10a1556b2eb441e4de3
- Tree SHA1: 6115fbc661b6e288d334a76eb1576724ece72de6
Added norobots meta content (put norobots at top of a page to stop it being indexed)
Commit diff
| |   |
| 105 | 105 | end |
| 106 | 106 | end |
| 107 | 107 | |
| 108 | | |
| 109 | | # Gitlab Specific |
| 110 | | # There are probably better places to put a lot of these (individual helpers?) |
| 111 | | # |
| 112 | | #TODO move to library |
| 113 | 108 | def title (page_title) |
| 114 | 109 | content_for(:title) { page_title } |
| 115 | 110 | end |
| 116 | 111 | |
| 117 | 112 | 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}" />}) |
| 119 | 114 | end |
| 120 | 115 | |
| 116 | def norobots |
| 117 | content_for(:norobots, %Q{<meta name="ROBOTS" content="NOINDEX">}) |
| 118 | end |
| 119 | |
| 121 | 120 | def div_no_breadcrumb |
| 122 | 121 | %Q{<div id='no_breadcrumb'></div>} |
| 123 | 122 | end |
| toggle raw diff |
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -105,19 +105,18 @@ module ApplicationHelper
end
end
-
- # Gitlab Specific
- # There are probably better places to put a lot of these (individual helpers?)
- #
- #TODO move to library
def title (page_title)
content_for(:title) { page_title }
end
def meta_description (text)
- content_for(:meta_description, %Q{<meta name="#{text}" content="" />})
+ content_for(:meta_description, %Q{<meta name="description" content="#{text}" />})
end
+ def norobots
+ content_for(:norobots, %Q{<meta name="ROBOTS" content="NOINDEX">})
+ end
+
def div_no_breadcrumb
%Q{<div id='no_breadcrumb'></div>}
end |
| |   |
| 1 | <% norobots %> |
| 2 | |
| 1 | 3 | <%= render :partial => "projects/ac_project_header", :locals => { :tab => PRJ_TAB_REPOS, :subtab => PRJ_TAB_REPOS_COMMIT, :project => @project, :pagetitle => @title } %> |
| 2 | 4 | |
| 3 | 5 | <%= render :partial => "commit_infobox" -%> |
| toggle raw diff |
--- a/app/views/commits/ac_show.html.erb
+++ b/app/views/commits/ac_show.html.erb
@@ -1,3 +1,5 @@
+<% norobots %>
+
<%= render :partial => "projects/ac_project_header", :locals => { :tab => PRJ_TAB_REPOS, :subtab => PRJ_TAB_REPOS_COMMIT, :project => @project, :pagetitle => @title } %>
<%= render :partial => "commit_infobox" -%> |
| |   |
| 5 | 5 | <head> |
| 6 | 6 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
| 7 | 7 | <%= yield(:meta_description) %> |
| 8 | <%= yield(:norobots) %> |
| 8 | 9 | <link rel="icon" href="/favicon.ico" type="image/ico"> |
| 9 | 10 | <link rel="shortcut icon" href="/favicon.ico"> |
| 10 | 11 | <link rel='alternate' type='application/rss+xml' title='RSS Feed' href='/rss.xml'/> |
| toggle raw diff |
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -5,6 +5,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<%= yield(:meta_description) %>
+<%= yield(:norobots) %>
<link rel="icon" href="/favicon.ico" type="image/ico">
<link rel="shortcut icon" href="/favicon.ico">
<link rel='alternate' type='application/rss+xml' title='RSS Feed' href='/rss.xml'/> |
| |   |
| 8 | 8 | #Disallow: /projects/ |
| 9 | 9 | |
| 10 | 10 | User-agent: * |
| 11 | | Disallow: /projects/gitlab/repos/ |
| 11 | #Disallow: /projects/gitlab/repos/ |
| toggle raw diff |
--- a/public/robots.txt
+++ b/public/robots.txt
@@ -8,4 +8,4 @@
#Disallow: /projects/
User-agent: *
-Disallow: /projects/gitlab/repos/
+#Disallow: /projects/gitlab/repos/ |