From 240dae0cffd35585f52dbb1189247380e74b4e64 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 7 Aug 2014 16:09:31 +0100 Subject: [PATCH 1/3] Provide template description as meta tag Conflicts: app/views/layout.jade --- services/web/app/views/layout.jade | 10 +++++++--- services/web/app/views/templates/template.jade | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/services/web/app/views/layout.jade b/services/web/app/views/layout.jade index 3bf20db16d..417b6b91c1 100644 --- a/services/web/app/views/layout.jade +++ b/services/web/app/views/layout.jade @@ -18,10 +18,14 @@ html(itemscope, itemtype='http://schema.org/Product') each subdomainDetails in settings.i18n.subdomainLang link(rel="alternate", href=subdomainDetails.url+currentUrl, hreflang=subdomainDetails.lngCode) - meta(itemprop="name" ,content="ShareLaTeX - Real Time Online LaTeX Collaborative Editor in Your Browser") - meta(itemprop="description", content="Online LaTeX editor for collaborative editing, great for Maths or Sciences. You don't need to install LaTeX so it's great for beginners too.") + meta(itemprop="name", content="ShareLaTeX, the Online LaTeX Editor") + + -if (typeof(meta) == "undefined") + meta(itemprop="description", content="An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.") + -else + meta(itemprop="description", content=meta) + meta(itemprop="image", content="https://www.sharelatex.com/favicon.ico") - meta(name="description", content="Online LaTeX editor for collaborative editing, great for Maths or Sciences. You don't need to install LaTeX so it's great for beginners too.") - if (typeof(gaToken) != "undefined") script(type='text/javascript'). diff --git a/services/web/app/views/templates/template.jade b/services/web/app/views/templates/template.jade index d403bfa576..5119155287 100644 --- a/services/web/app/views/templates/template.jade +++ b/services/web/app/views/templates/template.jade @@ -1,5 +1,9 @@ extends ../layout +block vars + - var meta = template.description + - title = title + " - LaTeX Template" + block content .content.content-alt .container From af1f0994af9c801de6c87329b96188e038d4a323 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 7 Aug 2014 16:53:01 +0100 Subject: [PATCH 2/3] Remove priority title stuff again --- services/web/app/views/layout.jade | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/web/app/views/layout.jade b/services/web/app/views/layout.jade index 417b6b91c1..9e3ea2501a 100644 --- a/services/web/app/views/layout.jade +++ b/services/web/app/views/layout.jade @@ -3,11 +3,9 @@ html(itemscope, itemtype='http://schema.org/Product') block vars head - - - if (typeof(priority_title) !== "undefined" && priority_title) - title= title + ' - '+ translate("online_latex_editor") - - else - title= translate("online_latex_editor") +' ShareLaTeX - ' +translate(title) + -if (typeof(title) == "undefined") + title ShareLaTeX, the Online LaTeX Editor + -else title= translate(title) + ' - ShareLaTeX, '+translate("online_latex_editor") link(rel="icon", href="/favicon.ico") From 5ec1c59a311a18e5fb42e3feb5730a20d322d9c8 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 7 Aug 2014 17:03:47 +0100 Subject: [PATCH 3/3] Add in i18n defaults --- services/web/config/settings.defaults.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/web/config/settings.defaults.coffee b/services/web/config/settings.defaults.coffee index 212cc3b926..e3b81b3a4c 100644 --- a/services/web/config/settings.defaults.coffee +++ b/services/web/config/settings.defaults.coffee @@ -105,7 +105,7 @@ module.exports = # Where your instance of ShareLaTeX can be found publically. Used in emails # that are sent out, generated links, etc. - siteUrl : 'http://localhost:3000' + siteUrl : siteUrl = 'http://localhost:3000' # cooke domain # use full domain for cookies to only be accesabble from that domain, @@ -144,7 +144,9 @@ module.exports = # ------ # i18n: - defaultLng:"en-US" + subdomainLang: + www: {lngCode:"en", url: siteUrl} + defaultLng: "en" # Spelling languages # ------------------