add meta tag for short story url
This commit is contained in:
parent
911bc2d088
commit
e453ba8b81
|
@ -97,6 +97,8 @@ class StoriesController < ApplicationController
|
|||
@page_title = "[Story removed]"
|
||||
end
|
||||
|
||||
@short_url = @story.short_id_url
|
||||
|
||||
@comments = Comment.ordered_for_story_or_thread_for_user(@story.id, nil,
|
||||
@user ? @user.id : nil)
|
||||
@comment = Comment.new
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<% if @short_url %>
|
||||
<link rev="canonical" rel="self alternate shorter shorturl shortlink"
|
||||
href="<%= @short_url %>" />
|
||||
<% end %>
|
||||
<title><%= @page_title ? "#{@page_title} | Lobsters" : "Lobsters" %></title>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
|
|
Loading…
Reference in a new issue