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

slathrop picture slathrop  路  18Comments

reiwa picture reiwa  路  54Comments

favoyang picture favoyang  路  24Comments

Pearyman picture Pearyman  路  19Comments

ulivz picture ulivz  路  18Comments