Documentation Contribution Guide
Overview
The directories zh
and en
represent Chinese and English documentation, respectively. The images
directory contains the corresponding image content.
Markdown Function Support Guide
For the content supported by Markdown, you can refer to the VitePress Writing Guide for information on Markdown functionality and writing guidelines.
Notes
- When you write documentation in the
zh
directory, you need to copy it to the correspondingen
directory. If you have time, you can use a large language model to translate it into the corresponding language. The same applies when writingen
documentation. - Store the corresponding document images in the
images
directory. The naming format should bedocument-name-number
. - If you need to reference other documents, you can refer to the VitePress Writing Guide. Many writing-related extension features can be found there to answer your questions.
- After completing the writing task, you need to add it to the corresponding directory. For specific steps, please refer to the content below.
How to Add Documents to the Directory
Open the
doc/.vitepress/src/sidebars
directory, as shown in the following figure:Here,
en
represents the English directory, andzh
represents the Chinese directory. We will use theen
directory as an example:tsexport const sidebar = [ { text: "Architect", collapsed: true, items: [ {text: "Overview", link: "/Architect/Overview"}, {text: "Placement Center", link: "/Architect/Placement-Center"}, {text: "Broker Server", link: "/Architect/Broker-Server"}, {text: "Storage Adapter", link: "/Architect/Storage-Adapter"}, {text: "Journal Server", link: "/Architect/Journal-Server"}, {text: "Ig Test", link: "/Architect/Test-Case"}, { text: "Configuration", collapsed: true, items: [ {text: "Placement Center", link: "/Architect/Configuration/Placement-Center"}, {text: "MQTT Broker", link: "/Architect/Configuration/Mqtt-Server"}, ], }, ], }, ]
The corresponding directory structure displayed is shown in the following figure:
The structure in the
en
directory is shown in the following figure:Therefore, if you want to add a
Test.md
document to the corresponding directory, you just need to add the following content to theen.mts
andzh.mts
indoc/.vitepress/src/sidebars
to add the content to the directory:tsexport const sidebar = [ { text: "Architect", collapsed: true, items: [ {text: "Overview", link: "/Architect/Overview"}, {text: "Placement Center", link: "/Architect/Placement-Center"}, {text: "Broker Server", link: "/Architect/Broker-Server"}, {text: "Storage Adapter", link: "/Architect/Storage-Adapter"}, {text: "Journal Server", link: "/Architect/Journal-Server"}, {text: "Ig Test", link: "/Architect/Test-Case"}, {text: "Test", link: "/Architect/Test"}, { text: "Configuration", collapsed: true, items: [ {text: "Placement Center", link: "/Architect/Configuration/Placement-Center"}, {text: "MQTT Broker", link: "/Architect/Configuration/Mqtt-Server"}, ], }, ], }, ]
TIP
If you want to learn more about how to use it, you can refer to the VitePress Sidebar Documentation.