justint / papaya

A clean Zola theme for blogging and projects.
https://justintennant.me/papaya/
MIT License
45 stars 24 forks source link

Add basic i18n support; add customizable social links; using relative path in img() shortcode #3

Closed cs-qyzhang closed 2 years ago

cs-qyzhang commented 2 years ago

Issue #2

I forgot to look at zola's doc in detail, the trans() function is good to use. I've refactored the code these days to add i18n support, it is not as simple as I think, currently zola's support to multilanguage isn't well. After some work, it's finally worked! Now in order to visit different language, we can only input URL mannually, we should add an icon in the top to change the language, but I'm not familiar with html/css, so this work will leave to you.:zany_face:

I also added some additional social links, and make it customizable.

In order to be able to specify the image path more conveniently, I added some code to support relative path of image.

You can see the output of this branch in https://jianyue.tech/ and https://jianyue.tech/zh/

Hope you like it!

justint commented 2 years ago

This is an amazing amount of work, thank you for opening this PR!

I'll begin my review and get my feedback to you soon!

cs-qyzhang commented 2 years ago

Thanks for the detailed review! I'm not good at english and a little buzy recently, so it will be glad that you can continue this work.

justint commented 2 years ago

Certainly, thanks again for the great contributions. I've since opened a new issue for the language selector (#6) to leave as an opportunity for others to tackle until if I can find time to do it myself.