Skip to content

Commit

Permalink
fix: making hreflang href full-qualified
Browse files Browse the repository at this point in the history
  • Loading branch information
aideremir committed Jul 20, 2018
1 parent 71f8004 commit 5dd4231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Vue.mixin({
}
const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'
const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>'
const BASE_URL = '<%= options.baseUrl %>'

// Prepare html lang attribute
const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale)
Expand All @@ -29,7 +30,7 @@ Vue.mixin({
return {
hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY],
rel: 'alternate',
href: this.switchLocalePath(locale.code),
href: BASE_URL + this.switchLocalePath(locale.code),
hreflang: locale[LOCALE_ISO_KEY]
}
} else {
Expand Down

0 comments on commit 5dd4231

Please sign in to comment.