-
Notifications
You must be signed in to change notification settings - Fork 181
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
About the i18n of blogs #623
Comments
Hi @Baoyuantop , there is a pr about split blog into Chinese and English, see if it matches your original claim. |
Hi, @Baoyuantop https://www.docusaurus.cn/docs/i18n/introduction#translation-files-location Here is a guide to supporting i18n, which I think we should use to solve the problem |
+1 agree |
OK, I'll try this method. |
At the same time, you can also find it in the PR list. I remember some contributors did it. |
Actual Behaviour
Currently, our blogs are mixed in English and Chinese. All blogs are displayed whether in English or Chinese. This often brings confusion and inconvenience to users of different languages.
Expected Behaviour
When the current environment is in English, only English blogs are displayed, and in the Chinese environment, only Chinese blogs are displayed.
After analysis, we can use the
draft
property of the markdown file to solve, It means that the current document is still in draft and will not be displayed in the blog.So because we default to the English environment, add the
draft
property to all Chinese blogs in thewebsite/blog
directory.After that, copy all the blog files to the
website/i18n/zh/docusaurus-plugin-content-blog
directory, and then add thedraft
property to all English blogs.Note: draft will still be displayed in development mode, but after build, it works ~
What do you think?
The text was updated successfully, but these errors were encountered: