<% site_name = setting(:title, Settings.app.title) site_slogan = setting(:slogan, Settings.app.slogan) site_title = "#{site_name} – #{site_slogan}" site_description = setting(:description, Settings.app.slogan) site_keywords = setting(:keywords, Settings.app.keywords) site_address = Settings.app.address city = Settings.app.city country = Settings.app.country copyright = Settings.app.copyright designer = Settings.app.designer publisher = Settings.app.publisher geo_region = Settings.app.geo.try(:region) geo_placename = Settings.app.geo.try(:placename) lat = Settings.app.geo.try(:lat) lng = Settings.app.geo.try(:lng) geo_position = lat && lng ? "#{lat};#{lng}" : nil icmb = lat && lng ? "#{lat}, #{lng}" : nil meta = { :title => site_title, :description => site_description, :charset => nil, :keywords => site_keywords, :viewport => "width=device-width, initial-scale=1.0", :og => {:type => "website"}, :Geography => site_address, :Copyright => copyright, :Designer => designer, :Publisher => publisher, :distribution => "Global", :city => city, :country => country, :"geo.region" => geo_region, :"geo.placename" => geo_placename, :"geo.position" => geo_position, :"ICBM" => icmb } if !home_page? if @object meta.merge!({ :title => "#{meta_title || title_for(@object)} « #{site_title}", :description => meta_description || description_for(@object), :og => {:image => (meta_image || image_for(@object)), :type => (meta_type || "article")} }) elsif current_page meta.merge!({ :title => "#{meta_title || current_page.title} « #{site_title}", :description => (meta_description || current_page.description) ? (meta_description || current_page.description) : nil, :og => {:image => meta_image, :type => (meta_type || "article")} }) elsif meta_title meta.merge!({ :title => "#{meta_title} « #{site_title}", :description => meta_description, :og => {:image => meta_image, :type => (meta_type || "article")} }) end end meta[:"DC.title"] = meta[:title] %> <%= meta_tags(meta) %> <%= yield :head %> <%= stylesheet_link_tag 'site/site', :media => "all" %> <%= yield :stylesheets %>