Feature #2303
Updated by Andriy Lesyuk over 10 years ago
Developers of third-party plugins should be able to add Open Graph and Twitter Cards to their pages +easily*. For this the code for generating Open Grapth and Twitter data should be moved to a nice API like:
<pre><code class="rhtml">
<%= Meta.open_grapth(:article) do
title topic.board.name: topic.subject
description meta_description
author topic.author
images meta_images
published_time topic.created_on
modified_time topic.updated_on
url board_message_path(topic.board, url_for(:controller => 'messages', :action => 'show', :board_id => topic.board, :id => topic, :only_path => false)
end %>
</code></pre>
<pre><code class="rhtml">
<%= Meta.open_grapth(:article) do
title topic.board.name: topic.subject
description meta_description
author topic.author
images meta_images
published_time topic.created_on
modified_time topic.updated_on
url board_message_path(topic.board, url_for(:controller => 'messages', :action => 'show', :board_id => topic.board, :id => topic, :only_path => false)
end %>
</code></pre>