daaru00 / gridsome-plugin-i18n

Gridsome plugin for i18n
MIT License
53 stars 12 forks source link

Persist hash when redirecting #36

Open michaelpelletier opened 3 years ago

michaelpelletier commented 3 years ago

When visiting a URL with a hash (something formatted akin to https://gridsome.org/docs/dynamic-routing/#file-based-dynamic-routes), the hash gets stripped out when the path is updated to include the /en prefix. This simply passes the hash on (if it exists), allowing the browser to still navigate to the correct spot on the page after the redirect has taken place.