Vuepress: Jump to the corresponding hash link when switching languages

Created on 10 Jun 2018  路  4Comments  路  Source: vuejs/vuepress

Contribution welcome!

Hacktoberfest contribution welcome good first issue community assigned feature request

Most helpful comment

I think this refers to assigning the # hash link to the url when switching language so that it will smooth scroll down. Currently, if you do abc.xyz/en#title, and switch to french, it will become abc.xyz/fr only. (Without the # hash link)
However I do notice that the hash links are translated too. Does it mean that the implementation will keep a counter on how far down the existing hash link is and assign a same 'distance' link in the translated version? (Assuming translated text fully correspond with original text)

Also, would love to contrib on this. @ulivz, any other ways you had in mind?

All 4 comments

Could you explain this a little bit more? I'd like to help on this one.

I think this refers to assigning the # hash link to the url when switching language so that it will smooth scroll down. Currently, if you do abc.xyz/en#title, and switch to french, it will become abc.xyz/fr only. (Without the # hash link)
However I do notice that the hash links are translated too. Does it mean that the implementation will keep a counter on how far down the existing hash link is and assign a same 'distance' link in the translated version? (Assuming translated text fully correspond with original text)

Also, would love to contrib on this. @ulivz, any other ways you had in mind?

I'd love to work on this one!

Because the anchor is different between two languages, there is no way to match the anchor.
I view this is not easy issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaomd picture gaomd  路  3Comments

AleksejDix picture AleksejDix  路  3Comments

lesliecdubs picture lesliecdubs  路  3Comments

lileiseven picture lileiseven  路  3Comments

FadySamirSadek picture FadySamirSadek  路  3Comments