about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/quotes_controller.rb11
-rw-r--r--app/views/layouts/quotes.html.haml1
2 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index cad7dfd..be931a0 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb
@@ -50,6 +50,17 @@ class QuotesController < ApplicationController
50 def show 50 def show
51 @quote = Quote.published.find(params[:id]) 51 @quote = Quote.published.find(params[:id])
52 52
53 set_meta_tags(og: {
54 title: "Quote \##{@quote.id}",
55 type: "article",
56 description: (@quote.content.length <= 300 ? @quote.content : @quote.content[0..299]),
57 url: quote_url(@quote, host: "www.fourisland.com"),
58 article: {
59 published_time: @quote.created_at.iso8601,
60 modified_time: @quote.updated_at.iso8601
61 }
62 })
63
53 respond_to do |format| 64 respond_to do |format|
54 format.html 65 format.html
55 format.json { render :json => @quote } 66 format.json { render :json => @quote }
diff --git a/app/views/layouts/quotes.html.haml b/app/views/layouts/quotes.html.haml index 5555248..68607f6 100644 --- a/app/views/layouts/quotes.html.haml +++ b/app/views/layouts/quotes.html.haml
@@ -7,6 +7,7 @@
7 = javascript_include_tag "application" 7 = javascript_include_tag "application"
8 = csrf_meta_tag 8 = csrf_meta_tag
9 = auto_discovery_link_tag :atom, latest_quotes_url(:atom) 9 = auto_discovery_link_tag :atom, latest_quotes_url(:atom)
10 = display_meta_tags og: { site_name: "Four Island" }
10 %body 11 %body
11 #wrap 12 #wrap
12 %header#banner 13 %header#banner