Skip to content

Commit

Permalink
Growstuff#816 For a plantings, add opengraph
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Mar 28, 2016
1 parent a3af618 commit d9423d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/views/plantings/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
=content_for :title, "#{@planting.crop} in #{@planting.location}"
- content_for :opengraph do
- if @planting.crop.photos.any?
<meta property="og:image" content="#{@planting.crop.photos.first.thumbnail_url}"/>
<meta property="og:title" content="#{@planting.crop} in #{@planting.location}" />
- if @planting.description
<meta property="og:description" content="#{@planting.description}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="#{request.original_url}" />
<meta property="og:site_name" content="#{ENV['GROWSTUFF_SITE_NAME']}" />

.row
.col-md-6
Expand Down

0 comments on commit d9423d5

Please sign in to comment.