seo_fuel 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -0
- data/app/models/seo_tag.rb +1 -1
- data/app/views/seo_tags/_meta_tags.html.erb +3 -0
- data/app/views/seo_tags/_seo_options.html.erb +13 -5
- data/config/locales/en.seo_fuel.yml +2 -0
- data/config/locales/nl.seo_fuel.yml +3 -1
- data/lib/seo_fuel/version.rb +1 -1
- data/lib/seo_fuel/view_helper.rb +12 -0
- data/vendor/assets/stylesheets/seo_fuel.css +14 -0
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/app/models/seo_tag.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class SeoTag < ActiveRecord::Base
|
2
|
-
attr_accessible :title, :description, :keywords, :canonical, :open_graph, :path, :use_project_title
|
2
|
+
attr_accessible :title, :description, :keywords, :canonical, :open_graph, :path, :use_project_title, :canonical, :nofollow, :noindex
|
3
3
|
serialize :open_graph
|
4
4
|
|
5
5
|
def show_title
|
@@ -14,11 +14,19 @@
|
|
14
14
|
<%= link_to I18n.t('seo.more_options'), "#", id: 'more-options-btn'%>
|
15
15
|
|
16
16
|
<div style="display: none;" id="more-options">
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
<%= f.label :keywords, "#{I18n.t('seo.form.keywords')}".html_safe %>
|
18
|
+
<%= f.text_area :keywords, rows: 3, placeholder: @default_keywords %>
|
19
|
+
<div class="spacer"></div>
|
20
|
+
<%= f.label :canonical, "#{I18n.t('seo.form.canonical')}".html_safe %>
|
21
|
+
<%= f.text_field :canonical, placeholder: I18n.t('seo.form.canonical_placeholder') %>
|
22
|
+
<div class="spacer"></div>
|
23
|
+
<div class="seo_check_box">
|
24
|
+
<%= f.check_box :nofollow %><%= f.label :nofollow, "#{I18n.t('seo.form.nofollow')}".html_safe %>
|
25
|
+
</div>
|
26
|
+
<div class="spacer"></div>
|
27
|
+
<div class="seo_check_box">
|
28
|
+
<%= f.check_box :noindex %><%= f.label :noindex, "#{I18n.t('seo.form.noindex')}".html_safe %>
|
29
|
+
</div>
|
22
30
|
</div>
|
23
31
|
<div class="spacer"></div>
|
24
32
|
<div id="seo_buttons">
|
@@ -11,4 +11,6 @@ nl:
|
|
11
11
|
description_tip: "Omschrijf waar deze pagina over gaat. Deze tekst wordt vaak getoond in Google."
|
12
12
|
keywords: Keywords
|
13
13
|
canonical: Canonical
|
14
|
-
canonical_placeholder: "URL van canoncial pagina, indien van toepassing"
|
14
|
+
canonical_placeholder: "URL van canoncial pagina, indien van toepassing"
|
15
|
+
noindex: noindex (blokkeer robots op deze pagina)
|
16
|
+
nofollow: nofollow (robots mogen links op deze pagina niet indexeren)
|
data/lib/seo_fuel/version.rb
CHANGED
data/lib/seo_fuel/view_helper.rb
CHANGED
@@ -79,6 +79,18 @@ module SeoFuel
|
|
79
79
|
current_page.canonical if current_page
|
80
80
|
end
|
81
81
|
|
82
|
+
|
83
|
+
# renders a list of robot restrictions (nofollow, noindex)
|
84
|
+
def robot_restrictions
|
85
|
+
restrictions = []
|
86
|
+
restrictions << "noindex" if current_page.noindex
|
87
|
+
restrictions << "nofollow" if current_page.nofollow
|
88
|
+
if restrictions.any?
|
89
|
+
return restrictions.join(', ')
|
90
|
+
else
|
91
|
+
return false
|
92
|
+
end
|
93
|
+
end
|
82
94
|
|
83
95
|
# render the dialog box and edit button by calling
|
84
96
|
# `edit_seo_dialog` in the templates that should have this
|
@@ -127,4 +127,18 @@
|
|
127
127
|
#seo_buttons {
|
128
128
|
float: right;
|
129
129
|
font-size: 12px;
|
130
|
+
}
|
131
|
+
|
132
|
+
.seo_check_box{
|
133
|
+
margin-left: 160px;
|
134
|
+
}
|
135
|
+
.seo_check_box input{
|
136
|
+
float: left;
|
137
|
+
width: 30px;
|
138
|
+
border: 1px solid red;
|
139
|
+
}
|
140
|
+
.seo_check_box label{
|
141
|
+
width: 400px;
|
142
|
+
text-align: left;
|
143
|
+
float: left;
|
130
144
|
}
|