Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from Oct 27, 2021

Conversation

cs-qyzhang
Copy link
Contributor

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
Copy link
Owner

justint commented Oct 10, 2021

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!

@justint justint self-assigned this Oct 10, 2021
Copy link
Owner

@justint justint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've finished my reviews on your changes. Once again thanks for submitting these, this is an awesome collection of updates to Papaya.

Let me know if you're interested and are willing to address the notes yourself, alternatively I'm happy to make the changes myself if you don't feel you have the time.

Once we've finalized the code changes, I would also like to take a pass at some spelling & grammar fixes to the README.

I still need to write out all the content for my own website with Papaya, so I don't think I'll have the time now to add in a language swap icon just yet. I can file a new issue in case someone else would want to take a stab at it first.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
config.toml Outdated Show resolved Hide resolved
config.toml Outdated Show resolved Hide resolved
config.toml Show resolved Hide resolved
templates/shortcodes/img.html Show resolved Hide resolved
@cs-qyzhang
Copy link
Contributor Author

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 justint linked an issue Oct 27, 2021 that may be closed by this pull request
@justint justint merged commit 067a744 into justint:main Oct 27, 2021
@justint justint mentioned this pull request Oct 27, 2021
@justint
Copy link
Owner

justint commented Oct 27, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add i18n support
2 participants