关于 - 文档的排版模板

参考资料

GitHub 风格的表格

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

Emoji

🎉 💯 😉

字体颜色

红色字体

目录

[[toc]]
1

自定义容器

TIP

这是一个提示

WARNING

这是一个警告

DANGER

这是一个危险警告

DETAILS

这是一个详情块,在 IE / Edge 中不生效

DETAILS
#include <iostream>
using namespace std;

// 全局函数
void myFun()
{
    cout<<"global function myFun"<<endl;
}

class MyClass
{
public:
    int printFun1()
    {
    	//调用的是全局函数
        ::myFun();
    }

     int printFun2()
    {
    	//调用的是成员函数
        myFun();
    }
    void myFun()
    {
        cout<<"MyClass function myFun"<<endl;
    }
};

int main()
{
    MyClass m;
    m.printFun1();
    cout<<"————————————————————"<<endl;
    m.printFun2();
    return 0;
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

代码块中的行高亮




 




export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}
1
2
3
4
5
6
7

导入代码段

<<< @/md/c++/features/c11/src/decltype.cpp
1

目录结构

.
├── docs
│   ├── .vuepress (可选的)
│   │   ├── components (可选的)
│   │   ├── theme (可选的)
│   │   │   └── Layout.vue
│   │   ├── public (可选的)
│   │   ├── styles (可选的)
│   │   │   ├── index.styl
│   │   │   └── palette.styl
│   │   ├── templates (可选的, 谨慎配置)
│   │   │   ├── dev.html
│   │   │   └── ssr.html
│   │   ├── config.js (可选的)
│   │   └── enhanceApp.js (可选的)
│   │ 
│   ├── README.md
│   ├── guide
│   │   └── README.md
│   └── config.md
│ 
└── package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
docs/.vuepress: 用于存放全局的配置、组件、静态资源等。
docs/.vuepress/components: 该目录中的 Vue 组件将会被自动注册为全局组件。
docs/.vuepress/theme: 用于存放本地主题。
docs/.vuepress/styles: 用于存放样式相关的文件。
docs/.vuepress/styles/index.styl: 将会被自动应用的全局样式文件,会生成在最终的 CSS 文件结尾,具有比默认样式更高的优先级。
docs/.vuepress/styles/palette.styl: 用于重写默认颜色常量,或者设置新的 stylus 颜色常量。
docs/.vuepress/public: 静态资源目录。
docs/.vuepress/templates: 存储 HTML 模板文件。
docs/.vuepress/templates/dev.html: 用于开发环境的 HTML 模板文件。
docs/.vuepress/templates/ssr.html: 构建时基于 Vue SSR 的 HTML 模板文件。
docs/.vuepress/config.js: 配置文件的入口文件,也可以是 YML 或 toml。
docs/.vuepress/enhanceApp.js: 客户端应用的增强。
1
2
3
4
5
6
7
8
9
10
11
12

collapsable: true 设置折叠属性