% if controller.is_a?(WikiController) %>
<% if page.text.present? && (!meta_description? || !meta_keywords?) %>
<% text = strip_textile(page.text, :object => page.content, :project => page.project, :attachments => page.attachments) %>
<% meta_description(truncate_description(text)) unless meta_description? %>
<% meta_keywords(extract_keywords(text)) unless meta_keywords? %>
<% end %>
<% settings = Setting.plugin_meta %>
<% unless settings[:facebook_admins].blank? %>
<% content_for(:header_tags) do %>
<% end %>
<% end %>
<% unless settings[:facebook_app].blank? %>
<% content_for(:header_tags) do %>
<% end %>
<% end %>
<% if Redmine::VERSION::MAJOR == 1 && Redmine::VERSION::MINOR == 0 %>
<% wiki_url = url_for(:controller => 'wiki', :action => 'index', :page => page.title, :id => page.project, :only_path => false) %>
<% else %>
<% wiki_url = url_for(:controller => 'wiki', :action => 'show', :id => page.title, :project_id => page.project, :only_path => false) %>
<% end %>
<% if settings[:open_graph] %>
<% content_for(:header_tags) do %>
<% if meta_description? %>
<% end %>
<% page.content.versions.collect{ |version| version.author }.uniq.each do |author| %>
<% end %>
<% meta_images do |image| %>
<% end %>
<% if page.respond_to?(:updated_on) %>
<% end %>
<% unless settings[:open_graph_site].blank? %>
<% end %>
<% end %>
<% end %>
<% if settings[:twitter_cards] %>
<% content_for(:header_tags) do %>
<% if meta_description? %>
<% end %>
<% catch :done do %>
<% meta_images do |image| %>
<% throw :done %>
<% end %>
<% end %>
<% project_twitter = project_twitter(page.project) %>
<% unless project_twitter.blank? %>
<% end %>
<% end %>
<% end %>
<% end %>