Skip to content

Commit cff7e1d

Browse files
Merge pull request #21 from cortex-cms/seo_robots
Add Seo Robots to deliver indexing info
2 parents 5021fbe + 64881b4 commit cff7e1d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/cortex/snippets/client/helper.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ def seo_keywords
2525
webpage[:seo_keyword_list]
2626
end
2727

28+
def seo_robots
29+
robot_information = []
30+
index_options = [:noindex, :nofollow, :noodp, :nosnippet, :noarchive, :noimageindex]
31+
32+
index_options.each do |index_option|
33+
robot_information << index_option if webpage[index_option]
34+
end
35+
36+
robot_information
37+
end
38+
2839
def noindex
2940
webpage[:noindex]
3041
end

0 commit comments

Comments
 (0)