Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Fix SEO title for localised sites
Browse files Browse the repository at this point in the history
  • Loading branch information
matjack1 committed Sep 4, 2019
1 parent 1f4ed82 commit 113e607
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/seoTagsBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ export const builders = {
itemEntity, entitiesRepo, i18n,
);


if (title) {
const suffix = (site.globalSeo && site.globalSeo.titleSuffix) || '';
const multiLocaleSite = site.locales.length > 1;
const suffix = (localizedRead(site, 'globalSeo', multiLocaleSite, i18n)
&& localizedRead(site, 'globalSeo', multiLocaleSite, i18n).titleSuffix) || '';

const titleWithSuffix = (title + suffix).length <= 60
? title + suffix
: title;
Expand Down

0 comments on commit 113e607

Please sign in to comment.