qier222 commented on issue #201:
URL: https://github.com/apache/apisix-website/issues/201#issuecomment-789008276


   ### docs目录结构
   
   将Markdown文件全部放入latest目录
   
   ```
   /docs
   ├── assets  # 存放静态文件
   │   ├── images
   │   │   ├── xxxxx.png
   │   └── other
   │       └── xxxxx.xxx
   ├── en
   │   └── latest
   │       ├── doc1.md
   │       ├── folder
   │       │   └── doc2.md
   │       │       └── folder2
   │       │           └── doc3.md
   │       └── config.json # 此locale的配置文件
   ├── es
   │   └── latest
   │       └── ...
   └── zh
       └── latest
           └── ...
   ```
   
   ### 配置文件
   
   位于 `/docs/<locale>/latest/config.json`,其中了`locale`是locale codes,请参考 
https://www.science.co.il/language/Locale-codes.php ,`locale` 
全小写。复制JSON后别忘了删除注释噢。
   
   关于sidebar的更多信息可访问 https://v2.docusaurus.io/docs/next/sidebar
   
   ```jsonc
   {
     "version": 2.3,
     "sidebar": [
       // APISIX网站的左侧侧边栏
       {
         "type": "doc",
         "id": "doc1" // id是md文件的文件名
       },
       {
         "type": "category", // category为折叠栏,可嵌套
         "label": "folder",
         "items": [
           {
             "type": "doc",
             "id": "folder/doc2"
           },
           {
             "type": "category",
             "label": "folder2",
             "items": [
               "folder2/doc3"
             ]
           }
         ]
       },
       {
         "type": "link",
         "label": "CHANGELOG",
         "href": "https://github.com/apache/apisix/blob/master/CHANGELOG";
       }
     ]
   }
   
   ```
   
   
   
   ### Markdown 格式限制
   
   - 
在Markdown文件内使用相对路径(`../xxx/xxx`),不可使用绝对路径(`/docs/en/xxx/xxx`)。如果要引用docs目录外的文件,请使用`https://github.com/apache/apisix-xxx/blob/master/xxx/xxx.xxx`
   - 引入图片时需要使用Markdown语法,即 `![a 
image](../assets/xxxx.png)`。不可使用HTML标签的方式引入图片,即`<img src="../assets/xxxx.png" 
/>`
   - 如果Markdown文件内包含HTML标签,请一定要确保标签闭合。例如`<br>`必须写成`<br/>`
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to