Skip to content

Commit 5dd4231

Browse files
committed
fix: making hreflang href full-qualified
1 parent 71f8004 commit 5dd4231

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/seo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Vue.mixin({
1414
}
1515
const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'
1616
const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>'
17+
const BASE_URL = '<%= options.baseUrl %>'
1718

1819
// Prepare html lang attribute
1920
const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale)
@@ -29,7 +30,7 @@ Vue.mixin({
2930
return {
3031
hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY],
3132
rel: 'alternate',
32-
href: this.switchLocalePath(locale.code),
33+
href: BASE_URL + this.switchLocalePath(locale.code),
3334
hreflang: locale[LOCALE_ISO_KEY]
3435
}
3536
} else {

0 commit comments

Comments
 (0)