Skip to content
Snippets Groups Projects
Commit 3db17209 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Metas via settings

parent 9279ab05
No related branches found
No related tags found
No related merge requests found
......@@ -71,3 +71,4 @@ todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
reactive-dict
yasinuslu:blaze-meta
......@@ -140,3 +140,4 @@ url@1.0.4
webapp@1.2.0
webapp-hashing@1.0.3
yasaricli:slugify@0.0.7
yasinuslu:blaze-meta@0.3.1
......@@ -6,6 +6,7 @@ Template.body.onRendered ->
l = 'dataLayer'
i = RocketChat.settings.get 'API_Analytics'
if Match.test(i, String) and i.trim() isnt ''
dataLayerComputation?.stop()
do (w,d,s,l,i) ->
w[l] = w[l] || []
w[l].push {'gtm.start': new Date().getTime(), event:'gtm.js'}
......@@ -15,8 +16,50 @@ Template.body.onRendered ->
j.async = true
j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl
f.parentNode.insertBefore j, f
dataLayerComputation.stop()
metaLanguageComputation = Tracker.autorun ->
if RocketChat.settings.get 'Meta:language'
metaLanguageComputation?.stop()
Meta.set
name: 'http-equiv'
property: 'content-language'
content: RocketChat.settings.get 'Meta:language'
Meta.set
name: 'name'
property: 'language'
content: RocketChat.settings.get 'Meta:language'
metaFBComputation = Tracker.autorun ->
if RocketChat.settings.get 'Meta:fb:app_id'
metaFBComputation?.stop()
Meta.set
name: 'property'
property: 'fb:app_id'
content: RocketChat.settings.get 'Meta:fb:app_id'
metaRobotsComputation = Tracker.autorun ->
if RocketChat.settings.get 'Meta:robots'
metaRobotsComputation?.stop()
Meta.set
name: 'name'
property: 'robots'
content: RocketChat.settings.get 'Meta:robots'
metaGoogleComputation = Tracker.autorun ->
if RocketChat.settings.get 'Meta:google-site-verification'
metaGoogleComputation?.stop()
Meta.set
name: 'name'
property: 'google-site-verification'
content: RocketChat.settings.get 'Meta:google-site-verification'
metaMSValidateComputation = Tracker.autorun ->
if RocketChat.settings.get 'Meta:msvalidate.01'
metaMSValidateComputation?.stop()
Meta.set
name: 'name'
property: 'msvalidate.01'
content: RocketChat.settings.get 'Meta:msvalidate.01'
Template.main.helpers
logged: ->
......
......@@ -2,18 +2,12 @@
<title>Rocket.Chat</title>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en-US" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta property="fb:app_id" content="835103589938459" />
<meta name="fragment" content="!" />
<meta name="distribution" content="global" />
<meta name="language" content="en-US" />
<meta name="rating" content="general" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="google-site-verification" content="wx2LmTKIPqkpThw42Bo3UGi7LnTc8v-baoo7kIT8z6Y" />
<meta name="msvalidate.01" content="CC595410A57B0314F81C928AE4E982C9" />
<meta name="apple-mobile-web-app-title" content="Rocket.Chat">
<meta name="application-name" content="Rocket.Chat">
<meta name="msapplication-TileColor" content="#04436a">
......
......@@ -22,3 +22,10 @@ Meteor.startup ->
RocketChat.settings.add 'Message_ShowEditedStatus', '', { type: 'string', group: 'Message' }
RocketChat.settings.add 'Message_ShowDeletedStatus', '', { type: 'string', group: 'Message' }
RocketChat.settings.add 'Message_KeepStatusHistory', '', { type: 'string', group: 'Message' }
RocketChat.settings.addGroup 'Meta'
RocketChat.settings.add 'Meta:language', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:fb:app_id', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:robots', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:google-site-verification', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:msvalidate.01', '', { type: 'string', group: 'Meta' }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment