Commit b3918678 by Ngô Trung Hưng

meta tag

parent a4297627
Pipeline #1107 failed with stages
in 0 seconds
...@@ -5,7 +5,13 @@ class ApplicationController < ActionController::Base ...@@ -5,7 +5,13 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception protect_from_forgery with: :exception
before_action :configure_permitted_parameters, if: :devise_controller? before_action :configure_permitted_parameters, if: :devise_controller?
before_action :set_locale before_action :set_locale, :prepare_meta_tag
def prepare_meta_tag
@tag = {}
@tag[:description] = t('meta.description')
@tag[:keys] = t('meta.keys')
end
def set_locale def set_locale
locale = (user_signed_in? ? current_user.language : params[:locale].to_s.strip).to_sym locale = (user_signed_in? ? current_user.language : params[:locale].to_s.strip).to_sym
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content= "<%= @tag[:description] %>">
<meta name="keywords" content= "<%= @tag[:keys] %>">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= render 'shared/shim' %> <%= render 'shared/shim' %>
......
...@@ -153,3 +153,6 @@ en: ...@@ -153,3 +153,6 @@ en:
pagination: pagination:
last: 'Last' last: 'Last'
first: 'First' first: 'First'
meta:
description: 'Platform human resource recruitment platform in Vietnam. Prestige quality ahihi. This ia the VENJOB'
keys: 'Recruitment, job, find a job, high salary, close to home, good job, quick job search, fast job search, job search, venjob'
...@@ -153,4 +153,6 @@ vi: ...@@ -153,4 +153,6 @@ vi:
pagination: pagination:
last: 'Cuối' last: 'Cuối'
first: 'Đầu' first: 'Đầu'
meta:
\ No newline at end of file description: 'Nền tảng tuyển dụng nhân sự hàng đầu Việt Nam. Uy tín chất lượng ahihi. Đó VẸNOB'
keys: 'Tuyển dụng, việc làm, tìm việc, lương cao, gần nhà, việc làm tốt, tim viec nhanh, tim viec lam nhanh, kiếm việc, venjob'
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