searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

使用markdown编写社区文章的方法

2023-06-21 01:30:02
19
0

社区发布文章目前不支持markdown格式,本文提供一种使用markdown编写文章,通过简单转换发布到社区的方法。

一,使用vscode并安装插件

在vscode上安装Markdown Preview Enhanced插件。Markdown Preview Enhanced是一个强大的 Markdown 插件,支持丰富的功能,如plant uml和数学公式。

二,编写和发布文章

步骤一:在vscode上将文章编写完成后,使用Markdown Preview Enhanced预览
步骤二:在预览界面右键-->Open in Browser

步骤三:在打开的网页全选然后复制到社区文章编辑界面

三,插入图片

由于不能使用本地插入的图片,所以要将需要用到的图片先上传,然后复制链接地址到markdown中

四,功能测试

4.1 代码块测试(支持)

#include <stdio.h>

int main(int argc, char** argv) {
    printf("hello world\n");
    return 0;
}

4.2 表格测试(支持)

Title Description
Version 0.0.1
Editor test

4.3 plantuml 测试(不支持)

@startmindmap
*[#Orange] root node
 *[#lightgreen] some first level node
  *[#FFBBCC] second level node
  *[#lightblue] another second level node
 *[#lightgreen] another first level node
@endmindmap

root nodesome first level nodesecond level nodeanother second level nodeanother first level node

 

五,本文markdown源码

> 社区发布文章目前不支持markdown格式,本文提供一种使用markdown编写文章,通过简单转换发布到社区的方法。

## 一,使用vscode并安装插件
在vscode上安装[Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)插件。Markdown Preview Enhanced是一个强大的 Markdown 插件,支持丰富的功能,如plant uml和数学公式。

## 二,编写和发布文章
步骤一:在vscode上将文章编写完成后,使用Markdown Preview Enhanced预览  
步骤二:在预览界面右键-->Open in Browser  
![](https://ctyun-developers-0510.gdoss.xstore.ctyun.cn/prod/ce2af2a5e8d64da1b8a3f18ef948f19f.png)
步骤三:在打开的网页全选然后复制到社区文章编辑界面


## 三,插入图片
由于不能使用本地插入的图片,所以要将需要用到的图片先上传,然后复制链接地址到markdown中
![](https://ctyun-developers-0510.gdoss.xstore.ctyun.cn/prod/8a2ba1f6cf0b4ad6a7bdb20468f7dfc1.png)

## 四,功能测试
### 4.1 代码块测试(支持)
``` cpp
#include <stdio.h>

int main(int argc, char** argv) {
    printf("hello world\n");
    return 0;
}
```

### 4.2 表格测试(支持)
| Title   | Description                        |
| :------ | :--------------------------------: |
| Version | 0.0.1                              |
| Editor  | test |

### 4.3 plantuml 测试(不支持)
```
@startmindmap
*[#Orange] root node
 *[#lightgreen] some first level node
  *[#FFBBCC] second level node
  *[#lightblue] another second level node
 *[#lightgreen] another first level node
@endmindmap
```
``` puml
@startmindmap
*[#Orange] root node
 *[#lightgreen] some first level node
  *[#FFBBCC] second level node
  *[#lightblue] another second level node
 *[#lightgreen] another first level node
@endmindmap
```
0条评论
0 / 1000