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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## version 0.1.2
2
+ - add noindex and nofollow
3
+ - show 'more options' link
4
+ - improved UI
5
+
6
+ ## version 0.1.1
7
+ - improved UI
8
+
1
9
  ## version 0.0.9
2
10
  - improved UI
3
11
  - read defaults from YAML file
@@ -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
@@ -5,4 +5,7 @@
5
5
  <% end -%>
6
6
  <% if canonical.present? -%>
7
7
  <link rel="canonical" href="<%= canonical %>" />
8
+ <% end -%>
9
+ <% if robot_restrictions -%>
10
+ <meta name="robots" content="<%= robot_restrictions%>">
8
11
  <% end -%>
@@ -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
- <%= 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') %>
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">
@@ -12,3 +12,5 @@ en:
12
12
  keywords: Keywords
13
13
  canonical: Canonical
14
14
  canonical_placeholder: "URL of canoncial page, if applicable"
15
+ noindex: noindex (block crawlers from this page)
16
+ nofollow: nofollow (stop crawlers from following links on this page)
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module SeoFuel
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seo_fuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: