untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
410 stars 59 forks source link

[Question] how to add buttons to switch language with jekyll-theme-chirpy theme #161

Closed ameaninglessname closed 2 years ago

ameaninglessname commented 2 years ago

image I wish to have the buttons and its functionality just like the bottom area.👆

But I have no idea about how to modify the things to make that happen...

After some searching though different repositories and issues, I decide to ask it here, sorry if this bother.

Feel free to close this.

ameaninglessname commented 2 years ago

the theme

ameaninglessname commented 2 years ago

My site is successfully build, the relative folder structure for multiple languages looks fine.

But the site only shows the default language content and I cannot find a way switch between them.

Tried to make up link with the language code prefix, and i get 404.

Should i tweak some permalink setting to make url work or this will be handled automatically?

Then, i come to the question above, the UI issue...

untra commented 2 years ago

Hi @ameaninglessname ,

try this bit of liquid magic out. it's the code behind that language switcher: https://github.com/untra/polyglot/blob/master/site/_includes/sidebar.html#L40-L45

cheers, @untra

ameaninglessname commented 2 years ago

Thanks! It works like a charm after I looking into overriding-theme-defaults documentation