Skip to content

Use absolute path for hreflang attribute #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stophecom opened this issue Sep 12, 2019 · 3 comments
Closed

Use absolute path for hreflang attribute #41

stophecom opened this issue Sep 12, 2019 · 3 comments
Assignees

Comments

@stophecom
Copy link
Collaborator

Google seems to recommend absolute links for alternative language links: https://support.google.com/webmasters/answer/189077?hl=en

E.g. <link rel="alternate" hreflang="en-gb" href="http://en-gb.example.com/page.html" />

Should be able to fix here: https://github.com/njam/nuxt-i18n-module/blob/e025a732377ee0d38b134775034b857510d0ca62/src/templates/plugin.js

@njam
Copy link
Owner

njam commented Sep 13, 2019

We're using VueRouter to resolve hreflang URLs. There's a base option, but unfortunately it doesn't work with absolute URLs. Opened a ticket about it: vuejs/vue-router#2927

@njam njam self-assigned this Sep 13, 2019
@njam
Copy link
Owner

njam commented Sep 13, 2019

Unfortunately absolute URLs are out of scope for VueRouter, so we'll need to handle it here. I will look into it.

@njam
Copy link
Owner

njam commented Sep 13, 2019

New option rootUrl is available in version 0.3.0

@njam njam closed this as completed Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants