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]"
|
@page_title = "[Story removed]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@short_url = @story.short_id_url
|
||||||
|
|
||||||
@comments = Comment.ordered_for_story_or_thread_for_user(@story.id, nil,
|
@comments = Comment.ordered_for_story_or_thread_for_user(@story.id, nil,
|
||||||
@user ? @user.id : nil)
|
@user ? @user.id : nil)
|
||||||
@comment = Comment.new
|
@comment = Comment.new
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<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>
|
<title><%= @page_title ? "#{@page_title} | Lobsters" : "Lobsters" %></title>
|
||||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
|
|
Loading…
Reference in a new issue