docusaurus
docusaurus copied to clipboard
wechaty doc update
I am planning on a major update for wechaty API document, considering there are many elementary wechaty related enquries since we launched workpro. Most of our customers are from China, however the official website of wechaty is in English. So i'll try to make it bilingual. After discussion, we decided to use built-in i18n module to provided bilingual support, even though most of our pages do not have bilingual version. The major work will be done in my spare time, or when I finished most of my work and want to do something less-challenging. So it might take a while. I'll post the new version of Wechaty page in English this two days so you guys can advise on styles and other matters. Please feel free to suggest or comment.
WIP Tracker
- [x] Wechaty #1514
- [ ] Bot Doc https://github.com/wechaty/docusaurus/pull/1527
- [ ] Section 1: Overview
WIP Tracker
moved to main thread
Actually I think we should add i18n to the whole wechaty doc website, instead of adding specific chinese doc page, change the whole website to be english/chinese should be a better solution.
That is also a potential solution. I did not use this method initially because I thought only a few pages capable of changing language is kinda wierd with a website level switch.
please compare these two approaches and tell me which one you like
- [x] with built-in i18n: https://github.com/wechaty/docusaurus/pull/1514
- [ ] with serperate submenu: https://github.com/wechaty/docusaurus/pull/1513
please compare these two approaches and tell me which one you like with built-in i18n: #1514 with serperate submenu: #1513
Vote for build-in i18n
I'll start working on it if no one else votes in 1 day.
@huan any suggestions?
I have no time to go through it in detail, but I like your idea for improving the docs.
Please go ahead with the most basic part of the docs (like fixing incorrect docs & examples) first, and I will give you feedback when I have time.
Thank you very much for pushing this moving forward!
Updates:
I'm working on PRs about wechaty doc. The English version should be done bofre this Thursday. The doc will be divided into two major parts, For Bot Developers and For Puppet Developers. Detailed Doc Chapters
Bot:
- Intro: Base info, 6-line bot demo, version changelog
- Install: How to install dependencies
- Hello World: Base concepts, create bot, listen to events, lifecycle, ding-dong bot
- User modules:
- Message
- Contact
- Room
- ...
- Events
Puppet:
- Intro: Wechaty architecture, Why we need a puppet class, Example of servering open-source puppets, version chagnelog.
- Install: same with bot.
- Hello World. How to setup an easist bot with MessageSendText only. (based on a hypothetical IM)
- Abstract methods of user modules:
- ...UserModules
- Pack puppet into service with Wechaty-Puppet-Service
Chinese version should also be expected.
I have recorede a video for i18n PR (https://github.com/wechaty/docusaurus/pull/1514). As you can see, the pages with a Chinese version can be displayed in Chinese, and the pages without one will remain in English (and will not be 404).
https://github.com/wechaty/docusaurus/assets/13669999/e4de83e0-ca6a-4595-837b-abeeb0f98efa