Commit 3baa7d36 by tady

set meta-tags

parent 71fbb91a
......@@ -163,3 +163,5 @@ gem 'rails_12factor', group: :production
# for IP restriction
gem 'rack-contrib', require: 'rack/contrib'
gem 'meta-tags'
......@@ -235,6 +235,8 @@ GEM
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2)
meta-tags (2.0.0)
actionpack (>= 3.0.0)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.1)
......@@ -491,6 +493,7 @@ DEPENDENCIES
kaminari!
launchy
mail
meta-tags
mysql2
newrelic_rpm
nokogiri
......
......@@ -8,6 +8,8 @@ class PostsController < ApplicationController
# GET /posts/1
# GET /posts/1.json
def show
set_meta_tags title: @post.title
current_user.visit_post!(@post)
@post.tags.each do |tag|
......@@ -18,6 +20,8 @@ class PostsController < ApplicationController
# GET /posts/new
def new
set_meta_tags title: '新しい投稿'
@post = Post.new(title: '新しい投稿')
render layout: 'edit'
end
......@@ -44,6 +48,8 @@ class PostsController < ApplicationController
# GET /posts/1/edit
def edit
set_meta_tags title: @post.title
render layout: 'edit'
end
......
......@@ -2,7 +2,7 @@ doctype html
= render partial: 'partials/rendezvous'
html lang="ja"
head
title Rendezvous
= display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css" rel="stylesheet" /
......
......@@ -2,7 +2,7 @@ doctype html
= render partial: 'partials/rendezvous'
html lang="ja"
head
title Rendezvous
= display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" rel="stylesheet" /
......
<!DOCTYPE html>
<html lang="ja">
<head>
<title>Rendezvous</title>
<%= display_meta_tags :site => 'Rendezvous', reverse: true %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="rails-<%= params[:controller] %>-<%= params[:action] %>">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment