module MetaTagsHelper
Public Instance Methods
Private Instance Methods
meta_description(given_meta_description)
click to toggle source
# File lib/generators/templates/app/helpers/meta_tags_helper.rb, line 23 def meta_description(given_meta_description) content_for?(:meta_description) ? tag('meta', name: 'description', :content => content_for(:meta_description)) : (tag('meta', :name => 'description', :content => given_meta_description) if !given_meta_description.nil?) end
meta_keywords(given_meta_keywords)
click to toggle source
# File lib/generators/templates/app/helpers/meta_tags_helper.rb, line 27 def meta_keywords(given_meta_keywords) content_for?(:meta_keywords) ? tag('meta', name: 'keywords', :content => content_for(:meta_keywords)) : (tag('meta', :name => 'keywords', :content => given_meta_keywords) if !given_meta_keywords.nil?) end
meta_title(given_meta_title)
click to toggle source
# File lib/generators/templates/app/helpers/meta_tags_helper.rb, line 19 def meta_title(given_meta_title) content_for?(:title) ? tag('meta', name: 'title', :content => content_for(:title)) : (tag('meta', :name => 'title', :content => given_meta_title) if !given_meta_title.nil?) end
set_iris_css()
click to toggle source
# File lib/generators/templates/app/helpers/meta_tags_helper.rb, line 35 def set_iris_css tag(:link, href: "https://cdn.jsdelivr.net/npm/iris-cms/templates/#{content_for(:iris_css)}.css", rel: 'stylesheet') if content_for?(:iris_css) end
set_title(given_title)
click to toggle source
# File lib/generators/templates/app/helpers/meta_tags_helper.rb, line 15 def set_title(given_title) content_for?(:title) ? content_tag(:title, content_for(:account_name) + ' | ' + content_for(:title)) : (content_tag(:title, given_title) if !given_title.nil?) end