这是您可以在 r3f.cn 上使用的魔法语法变体手册,对于贡献者来说这是一个很好的实践。
$ git clone https://github.com/Fechin/reference.git
$ npm install
$ npm run dev
source/_posts/{name}.md
参考源代码是一个好习惯 速查表参考。
.
├── source
│ ├── _posts # 速查表源文件
│ │ ├── awk.md
│ │ ├── vim.md # => r3f.cn/vim
│ │ ├── php.md
│ │ ├── css.md # => r3f.cn/css
│ │ ├── ...
│ └── widget # 小部件文件
│ └── chmod.html
├── public # 分发文件
├── _config.yml
├── gulpfile.js
├── package.json
├── postcss.config.js
├── tailwind.config.js
└── themes
└── coo # 主题文件
.
├── 区域 1 # 标题
│ ├── 卡片 1
│ ├── 卡片 2
│ ├── 卡片 3
│ ├── ...
├── 区域 2
│ ├── 卡片 1
│ │ ├── 段落
│ │ ├── 代码
│ │ ├── <hr/> (即 "---")
│ │ ├── 列表
│ │ │ ├── 段落
│ │ │ └── 代码
│ │ └── 表格
│ │ ├── 段落
│ │ └── 代码
│ ├── 卡片 2
│ ├── 卡片 3
│ └── ...
├── 区域 3
├── 区域 4
└── ...
## 入门指南
### 列表卡片 {.col-span-2}
- 分享快速参考
- 开发人员速查表 ... {.style-timeline}
### 表格卡片
| id | name |
| --- | ------- |
| 1 | Roberta |
{.show-header}
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ 4 ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
### 1
### 2
### 3
### 4
### 5 {.col-span-2}
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 3 ┆ ┆ 4 ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
### 1
### 2 {.col-span-2}
### 3
### 4
### 5
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 4 ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
### 1
### 2
### 3
### 4 {.col-span-2}
### 5
╭┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ ┆ ┆ 4 ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
### 1 {.row-span-2}
### 2
### 3
### 4
### 5
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮
┆ 4 ┆ ┆ ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
### 1
### 2 {.row-span-2}
### 3
### 4
### 5
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ┆ ┆
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ┆ ┆
┆ 4 ┆ ┆ 5 ┆ ┆ ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈╯
### 1
### 2
### 3 {.row-span-2}
### 4
### 5
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2 ┆
┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯
┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮
┆ ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 4 ┆ ┆ 5 ┆ ┆ 6 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
### 1 {.col-span-2 .row-span-2}
### 2
### 3
### 4
### 5
同时跨越行和列
- | - |
---|---|
{.show-header} |
显示表格的表头 |
{.shortcuts} |
渲染快捷键样式 |
{.bold-first} |
加粗第一列 |
{.plus-first} |
第一列加号 |
{.show-header} |
显示表头 |
{.left-text} |
最后一列左对齐 |
{.no-wrap} |
不换行 |
模式 | 描述 |
---|---|
[abc] |
匹配 a, b 或 c |
[^abc] |
匹配除 a, b 或 c 之外的字符 |
[a-z] |
匹配 a 到 z |
| 模式 | 描述 |
| -------- | ---------------------- |
| `[abc]` | 匹配 a, b 或 c |
| `[^abc]` | 匹配除 a, b 或 c 之外的字符 |
| `[a-z]` | 匹配 a 到 z |
- | - |
---|---|
Ctrl N |
新建文件 |
Ctrl S |
保存 |
| - | - |
| ---------- | -------- |
| `Ctrl` `N` | 新建文件 |
| `Ctrl` `S` | 保存 |
{.shortcuts}
模式 | 描述 |
---|---|
[abc] |
匹配 a, b 或 c |
[^abc] |
匹配除 a, b 或 c 之外的字符 |
[a-z] |
匹配 a 到 z |
| 模式 | 描述 |
| -------- | ---------------------- |
| `[abc]` | 匹配 a, b 或 c |
| `[^abc]` | 匹配除 a, b 或 c 之外的字符 |
| `[a-z]` | 匹配 a 到 z |
{.show-header}
列表列
- | - |
---|---|
{.cols-1} |
单列 (默认) |
{.cols-2} |
双列 |
... | |
{.cols-6} |
列表标记
- | - |
---|---|
{.marker-none} |
未设置标记 |
{.marker-timeline} |
时间轴样式的标记 |
{.marker-round} |
圆形标记 |
new_name
$ git branch -m <new_name>
$ git push origin -u <new_name>
shell script $ git push origin --delete <old>
- **重命名** 为 `new_name`
```shell script
$ git branch -m <new_name>
```
- **推送** 并重置
```shell script
$ git push origin -u <new_name>
```
- **删除** 远程分支 `shell script $ git push origin --delete <old> `
{.marker-timeline}
r3f.cn.is(() => {
awesome.site();
});
here.is.some.more();
````js
r3f.cn.is(() => {
awesome.site()
})
\```
```js
here.is.some.more()
\```
````
代码块可以一个接一个地放置。
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
```js {.wrap}
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
```
添加 {.wrap}
以换行长行。
function createNode(nodeName: string, options: { key: string }) {
return true
}
长行将有滚动条。