-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path16.html
More file actions
276 lines (276 loc) · 23.4 KB
/
Copy path16.html
File metadata and controls
276 lines (276 loc) · 23.4 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="CodeClub - OpenCode 自定义命令" />
<meta name="author" content="Jackson" />
<title>OpenCode 自定义命令 - CodeClub</title>
<link rel="icon" type="image/x-icon" href="../../img/logo.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="../../css/main.css" />
<link rel="stylesheet" href="../../css/dark-mode.css" />
<link rel="stylesheet" href="../../css/mobile-optimizations.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.0/marked.min.js"></script>
<style>
.tutorial-page {
max-width: 1200px;
margin: 70px auto 40px;
padding: 0 20px;
display: flex;
gap: 20px;
}
.tutorial-sidebar {
width: 240px;
flex-shrink: 0;
position: sticky;
top: 70px;
max-height: calc(100vh - 90px);
overflow-y: auto;
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-sidebar h3 {
font-size: 15px;
margin: 0 0 12px;
color: var(--text-primary, #1a1a2e);
padding-bottom: 8px;
border-bottom: 2px solid var(--primary, #3b82f6);
}
.tutorial-sidebar a {
display: block;
padding: 5px 8px;
color: var(--text-secondary, #666);
text-decoration: none;
font-size: 13px;
border-radius: 4px;
line-height: 1.4;
}
.tutorial-sidebar a:hover {
background: var(--primary, #3b82f6);
color: #fff;
}
.tutorial-sidebar a.active {
background: var(--primary, #3b82f6);
color: #fff;
font-weight: 600;
}
.tutorial-main {
flex: 1;
min-width: 0;
}
.tutorial-article {
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 32px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-article h1 {
font-size: 26px;
margin-bottom: 16px;
color: var(--text-primary, #1a1a2e);
border-bottom: 2px solid var(--primary, #3b82f6);
padding-bottom: 12px;
}
.markdown-body {
font-size: 15px;
line-height: 1.8;
color: var(--text-secondary, #333);
}
.markdown-body h1 {
font-size: 24px;
border-bottom: 1px solid var(--border, #e5e7eb);
padding-bottom: 8px;
}
.markdown-body h2 {
font-size: 20px;
border-bottom: 1px solid var(--border, #e5e7eb);
padding-bottom: 6px;
}
.markdown-body h3 {
font-size: 17px;
}
.markdown-body pre {
background: #1e1e2e;
color: #cdd6f4;
padding: 16px;
border-radius: 8px;
overflow-x: auto;
}
.markdown-body code {
font-family: 'Fira Code', 'Cascadia Code', monospace;
font-size: 14px;
}
.markdown-body p code {
background: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
color: #e83e8c;
}
.markdown-body blockquote {
border-left: 4px solid var(--primary, #3b82f6);
padding: 12px 20px;
margin: 16px 0;
background: #f8fafc;
border-radius: 0 8px 8px 0;
}
.markdown-body img {
max-width: 100%;
border-radius: 8px;
}
.markdown-body table {
border-collapse: collapse;
width: 100%;
margin: 16px 0;
}
.markdown-body table th,
.markdown-body table td {
border: 1px solid var(--border, #e5e7eb);
padding: 8px 12px;
text-align: left;
}
.markdown-body table th {
background: var(--bg-primary, #f8fafc);
font-weight: 600;
}
.markdown-body table tr:nth-child(2n) {
background: var(--bg-primary, #f8fafc);
}
.markdown-body ul,
.markdown-body ol {
padding-left: 24px;
margin: 12px 0;
}
.markdown-body li {
margin: 4px 0;
}
.markdown-body hr {
border: none;
border-top: 1px solid var(--border, #e5e7eb);
margin: 24px 0;
}
.markdown-body a {
color: var(--primary, #3b82f6);
text-decoration: none;
}
.markdown-body a:hover {
text-decoration: underline;
}
.page-navigation {
display: flex;
justify-content: space-between;
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid var(--border, #e5e7eb);
}
.page-nav-link {
color: var(--primary, #3b82f6);
text-decoration: none;
font-weight: 500;
font-size: 14px;
}
.page-nav-link:hover {
text-decoration: underline;
}
.source-link {
margin-top: 16px;
font-size: 13px;
color: var(--text-secondary, #999);
}
.source-link a {
color: var(--primary, #3b82f6);
}
@media (max-width: 768px) {
.tutorial-page {
flex-direction: column;
}
.tutorial-sidebar {
width: 100%;
position: static;
max-height: 200px;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<a class="navbar-brand" href="../../index.html">
<img src="../../img/logo.png" alt="CodeClub" width="32" height="32" />
<span>CodeClub</span>
</a>
<button class="mobile-menu-toggle" aria-label="切换导航菜单"><span></span><span></span><span></span></button>
<ul class="navbar-nav">
<li><a class="nav-link" href="../../index.html">首页</a></li>
<li><a class="nav-link" href="../../nav.html">网址导航</a></li>
<li><a class="nav-link" href="../../blog/">博客</a></li>
<li><a class="nav-link" href="../../wiki/index.html" target="_blank">WiKi</a></li>
<li><a class="nav-link active" href="../index.html">教程</a></li>
<li><a class="nav-link" href="../../book.html">图书</a></li>
<li><a class="nav-link" href="../../contact.html">联系我</a></li>
<li><a class="nav-link" href="../../about.html">关于我</a></li>
</ul>
</div>
</nav>
<div class="tutorial-page">
<div class="tutorial-sidebar">
<h3>📖 OpenCode</h3>
<a href="0.html">OpenCode 教程</a>
<a href="1.html">OpenCode 简介</a>
<a href="2.html">OpenCode 安装</a>
<a href="3.html">OpenCode 配置</a>
<a href="4.html">OpenCode 第一次使用</a>
<a href="5.html">OpenCode VSCode</a>
<a href="6.html">OpenCode 终端界面</a>
<a href="7.html">OpenCode CLI 使用</a>
<a href="8.html">OpenCode Web 使用</a>
<a href="9.html">OpenCode GitHub</a>
<a href="10.html">OpenCode GitLab</a>
<a href="11.html">OpenCode 工具</a>
<a href="12.html">OpenCode 规则</a>
<a href="13.html">OpenCode 代理</a>
<a href="14.html">OpenCode 主题</a>
<a href="15.html">OpenCode 快捷键</a>
<a href="16.html" class="active">OpenCode 自定义命令</a>
<a href="17.html">OpenCode 格式化工具</a>
<a href="18.html">OpenCode 权限配置</a>
<a href="19.html">OpenCode LSP 服务器配置</a>
<a href="20.html">OpenCode MCP 服务器配置</a>
<a href="21.html">OpenCode Skills</a>
<a href="22.html">OpenCode 自定义工具</a>
</div>
<div class="tutorial-main">
<div class="tutorial-article">
<div class="markdown-body" id="md-content"></div>
<div class="page-navigation">
<a href="15.html" class="page-nav-link">← OpenCode 快捷键</a>
<a href="17.html" class="page-nav-link">OpenCode 格式化工具 →</a>
</div>
<div class="source-link">原文来源:<a href="https://www.runoob.com" target="_blank">菜鸟教程</a></div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-content"><p>© 2024 CodeClub. All rights reserved.</p></div>
</footer>
<script src="../../js/dark-mode.js"></script>
<script src="../../js/mobile-menu.js"></script>
<script>
const md = `# OpenCode 自定义命令\n\n\n自定义命令允许你将常用的提示词封装成一个短命令,在 TUI 中通过 \`/命令名称\` 的方式一键执行,避免重复输入相同的提示词。\n\n例如,将"运行测试并分析失败原因"这个复杂提示词封装为 \`/test\`,每次只需输入两个字符即可触发。\n\n\n\n自定义命令是 \`/init\`、\`/undo\`、\`/redo\`、\`/share\`、\`/help\` 等内置命令之外的扩展。\n\n\n\n如果你定义的自定义命令与内置命令同名,**自定义命令会覆盖内置命令**。请避免使用 \`init\`、\`undo\`、\`redo\`、\`share\`、\`help\` 作为自定义命令名称,除非你明确需要替换内置行为。\n\n\n\n\n---\n\n\n## 两种定义方式\n\n\n自定义命令支持两种定义方式,效果完全相同,可以按照个人习惯选择:\n\n\n\n\n \n \n 方式\n 文件\n 适用场景\n \n \n \n \n **JSON 配置**\n \`opencode.json\` 的 \`command\` 字段\n 命令较少,希望集中管理所有配置\n \n \n **Markdown 文件**\n \`commands/\` 目录下的 \`.md\` 文件\n 命令内容较长,希望每个命令单独维护\n \n \n\n\n\n---\n\n\n## 方式一:JSON 配置\n\n\n在 \`opencode.json\` 的 \`command\` 字段中定义,键名即为命令名称:\n\n\n\n\n## 实例\n\n{\n\n "$schema": "https://opencode.ai/config.json",\n\n "command": {\n\n "test": { // 命令名称,在 TUI 中通过 /test 调用\n\n "template": "Run the full test suite with coverage report and show any failures.\\nFocus on the failing tests and suggest fixes.",\n\n // template:发送给 LLM 的提示词内容(必填)\n\n "description": "Run tests with coverage",\n\n // description:在 TUI 命令列表中显示的说明(可选)\n\n "agent": "build", // agent:指定执行此命令的代理(可选)\n\n "model": "anthropic/claude-3-5-sonnet-20241022"\n\n // model:覆盖此命令使用的模型(可选)\n\n }\n\n }\n\n}\n\n\n\n配置完成后,在 TUI 输入框中输入 \`/test\` 并回车即可执行该命令。\n\n\n\n\n---\n\n\n## 方式二:Markdown 文件\n\n\n在 \`commands/\` 目录下创建 \`.md\` 文件来定义命令,**文件名即为命令名**,文件内容分为两部分:\n\n\n\n\n\n\n- **Frontmatter**(\`---\` 包裹的 YAML 部分):定义命令的属性\n\n- **正文**(Frontmatter 下方的内容):成为发送给 LLM 的提示词模板\n\n\n\nMarkdown 文件支持两个存放位置:\n\n\n\n\n\n\n- **项目级:**\`.opencode/commands/命令名.md\`(仅对当前项目有效)\n\n- **全局:**\`~/.config/opencode/commands/命令名.md\`(对所有项目有效)\n\n\n\n\`\`\`\n\n\n---\ndescription: Run tests with coverage\nagent: build\nmodel: anthropic/claude-3-5-sonnet-20241022\n---\n\nRun the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.\n\`\`\`\n\n\n该文件名为 \`test.md\`,因此命令名为 \`test\`,在 TUI 中通过 \`/test\` 调用。\n\n\n\n\n---\n\n\n## 提示词模板语法\n\n\n命令的提示词(\`template\` 字段或 Markdown 正文)支持以下特殊语法,可以让提示词动态响应参数、实时注入命令输出或引用文件内容。\n\n\n\n\n### 1、传入参数($ARGUMENTS)\n\n\n使用 \`$ARGUMENTS\` 占位符接收命令调用时传入的参数,整体作为一个字符串插入:\n\n\n\n\n\`\`\`\n\n---\ndescription: Create a new React component\n---\n\nCreate a new React component named $ARGUMENTS with TypeScript support.\nInclude proper typing and basic structure.\n\`\`\`\n\n\n\n调用时在命令名后附加参数:\n\n\n\n\n\`\`\`\n/component Button\n\`\`\`\n\n\n\`$ARGUMENTS\` 会被替换为 \`Button\`,实际执行的提示词变为:\n\n\n\n\n\`\`\`\nCreate a new React component named Button with TypeScript support.\nInclude proper typing and basic structure.\n\`\`\`\n\n\n\n### 2、位置参数($1、$2、$3…)\n\n\n当需要传入多个独立参数时,可以使用位置参数 \`$1\`、\`$2\`、\`$3\` 分别引用每个参数,空格分隔,含空格的参数用引号包裹:\n\n\n\n\`\`\`\n\n\n---\ndescription: Create a new file with content\n---\n\nCreate a file named $1 in the directory $2\nwith the following content: $3\n\`\`\`\n\n\n调用示例(含空格的参数用引号包裹):\n\n\n\n\n\`\`\`\n/create-file config.json src "{ \\"key\\": \\"value\\" }"\n\`\`\`\n\n\n各占位符的替换结果:\n\n\n\n\n \n \n 占位符\n 替换为\n \n \n \n \n \`$1\`\n \`config.json\`\n \n \n \`$2\`\n \`src\`\n \n \n \`$3\`\n \`{ "key": "value" }\`\n \n \n\n\n\n### 3、注入 Shell 命令输出(!\`command\`)\n\n\n使用 \`!\`shell命令\`\` 语法可以在命令执行时运行一段 Shell 命令,并将其输出结果直接插入提示词中。Shell 命令在**项目根目录**下运行。这在需要让 LLM 分析实时数据(如测试结果、git 日志等)时非常有用:\n\n\n\n\`\`\`\n\n\n---\ndescription: Analyze test coverage\n---\n\nHere are the current test results:\n!\`npm test\`\n\nBased on these results, suggest improvements to increase coverage.\n\`\`\`\n\n\n\`\`\`\n\n\n---\ndescription: Review recent git changes\n---\n\nRecent git commits:\n!\`git log --oneline -10\`\n\nReview these changes and suggest any improvements or potential issues.\n\`\`\`\n\n执行命令时,\`!\`git log --oneline -10\`\` 会被替换为实际的 git 日志输出,然后连同提示词一起发送给 LLM。\n\n\n\n\n### 4、引用文件内容(@文件路径)\n\n\n使用 \`@文件路径\` 语法可以将指定文件的内容自动包含在提示词中,无需手动复制粘贴:\n\n\n\n\`\`\`\n\n\n---\ndescription: Review a component for performance issues\n---\n\nReview the component in @src/components/Button.tsx.\nCheck for performance issues and suggest improvements.\n\`\`\`\n\n\n执行命令时,\`@src/components/Button.tsx\` 会被替换为该文件的完整内容,LLM 可以直接分析文件代码。\n\n\n\n\n---\n\n\n## 配置选项详解\n\n\n以下是自定义命令支持的所有配置选项,Markdown 文件中写在 frontmatter 里,JSON 配置中写在命令对象下:\n\n\n\n\n \n \n 选项\n 是否必填\n 类型\n 说明\n \n \n \n \n \`template\`\n 必填(JSON 方式)\n 字符串\n 发送给 LLM 的提示词内容。Markdown 方式中正文即为 template,无需单独声明\n \n \n \`description\`\n 可选\n 字符串\n 命令的简要说明,输入 \`/\` 时在 TUI 命令列表中显示,帮助快速识别命令用途\n \n \n \`agent\`\n 可选\n 字符串\n 指定执行此命令的代理名称。未指定则使用当前选中的代理。若指定的是子代理,命令默认触发子代理调用\n \n \n \`subtask\`\n 可选\n 布尔值\n 设为 \`true\` 可强制命令以子代理方式运行,避免污染主会话上下文。设为 \`false\` 可禁止子代理调用行为\n \n \n \`model\`\n 可选\n 字符串\n 覆盖此命令使用的模型,格式为 \`provider/model-id\`,如 \`anthropic/claude-3-5-sonnet-20241022\`\n \n \n\n\n\n### agent 与 subtask 的关系\n\n\n\`agent\` 和 \`subtask\` 共同控制命令的执行方式:\n\n\n\n\n\n\n- 若 \`agent\` 指定的是一个子代理(mode 为 subagent),命令**默认触发子代理调用**,在独立上下文中执行,不影响主会话\n\n- 若不希望此行为,将 \`subtask\` 设为 \`false\` 可强制在主会话中执行\n\n- 若将 \`subtask\` 设为 \`true\`,无论代理的 \`mode\` 设置如何,命令始终以子代理方式运行,适合需要完全隔离上下文的场景\n\n\n\n\n## 实例\n\n{\n\n "$schema": "https://opencode.ai/config.json",\n\n "command": {\n\n "analyze": {\n\n "template": "Analyze the codebase for potential security vulnerabilities.",\n\n "description": "Security analysis(独立运行,不污染主会话)",\n\n "subtask": true, // 强制以子代理方式运行,分析结果不占用主会话上下文\n\n "model": "anthropic/claude-3-5-sonnet-20241022"\n\n },\n\n "review": {\n\n "template": "Review the current code changes.",\n\n "description": "Code review(在当前代理中运行)",\n\n "agent": "plan", // 使用 plan 代理执行\n\n "subtask": false // 禁止子代理调用,在主会话中运行\n\n }\n\n }\n\n}\n\n\n\n\n---\n\n\n## 综合使用示例\n\n\n\n### 示例一:多参数代码生成命令\n\n\n\`\`\`\n\n\n---\ndescription: Generate a REST API endpoint\nagent: build\n---\n\nGenerate a $1 REST API endpoint for the resource "$2".\nPlace the file in the $3 directory.\nInclude input validation, error handling, and JSDoc comments.\n\n\n\n\`\`\`\n\n\n\n\n### 示例二:结合 Shell 输出和文件引用的代码审查命令\n\n\n\`\`\`\n\n\n---\ndescription: Review changes in current branch against main\nagent: plan\nsubtask: true\n---\n\nPlease review the following changes for code quality, potential bugs, and security issues.\n\n## Recent commits\n!\`git log main..HEAD --oneline\`\n\n## Changed files\n!\`git diff main --name-only\`\n\n## Diff content\n!\`git diff main\`\n\n## Project coding guidelines\n@.opencode/AGENTS.md\n\nProvide structured feedback with severity levels (critical / warning / suggestion).\n\`\`\`\n\n\n\n### 示例三:定时数据快照命令(JSON 方式)\n\n\n\`\`\`\n\n{\n "$schema": "https://opencode.ai/config.json",\n "command": {\n "healthcheck": {\n "description": "Check project health status",\n "template": "Analyze the project health based on the following data:\\n\\nDependency vulnerabilities:\\n!\`npm audit --json\`\\n\\nOutdated packages:\\n!\`npm outdated\`\\n\\nTest results:\\n!\`npm test -- --passWithNoTests 2>&1 | tail -20\`\\n\\nSummarize the issues by severity and suggest a prioritized action plan.",\n "model": "anthropic/claude-3-5-sonnet-20241022",\n "subtask": true\n }\n }\n}\n\`\`\`\n \n \n \n \n \n\n \n \n [ OpenCode 格式化工具](http://www.runoob.com/opencode/opencode-formatter.html)\n \n\n \n \n \n \n \n\n\n\n\n \n \n \n### 点我分享笔记\n\n \n \n \n \n \n \n [取消](https://www.runoob.comjavascript:;)\n\n\n \n \n \n \n \n \n\n\n 分享笔记\n \n \n \n \n \n \n\n 昵称昵称 (必填)\n 邮箱邮箱 (必填)\n 引用地址引用地址\n \n\n \n \n \n \n\n \n \n\n\n\n\n\n\n\n\n\n \n\n \n\n\n\n\n\n\n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n\n 在线实例\n\n\n ·[HTML 实例](https://www.runoob.com/html/html-examples.html)\n\n\n ·[CSS 实例](https://www.runoob.com/css/css-examples.html)\n\n\n ·[JavaScript 实例](https://www.runoob.com/js/js-examples.html)\n\n\n ·[Ajax 实例](https://www.runoob.com/ajx/ajax-examples.html)\n\n\n ·[jQuery 实例](https://www.runoob.com/jquery/jquery-examples.html)\n\n\n ·[XML 实例](https://www.runoob.com/xml/xml-examples.html)\n\n\n ·[Java 实例](https://www.runoob.com/java/java-examples.html)\n\n\n\n\n\n 字符集&工具\n\n\n · [HTML 字符集设置](https://www.runoob.com/charsets/html-charsets.html)\n\n\n · [HTML ASCII 字符集](https://www.runoob.com/tags/html-ascii.html)\n\n\n · [JS 混淆/加密](https://www.jyshare.com/front-end/6939/)\n\n\n · [PNG/JPEG 图片压缩](https://www.jyshare.com/front-end/6232/)\n\n\n · [HTML 拾色器](https://www.runoob.com/tags/html-colorpicker.html)\n\n\n · [JSON 格式化工具](https://www.jyshare.com/front-end/53)\n\n\n · [随机数生成器](https://www.jyshare.com/front-end/6680/)\n\n\n\n\n 最新更新\n\n\n ·\n [\n OpenCode 自定义... ](http://www.runoob.com/opencode/opencode-custom-tools.html)\n\n\n ·\n [\n OpenCode Skills ](http://www.runoob.com/opencode/opencode-skills.html)\n\n\n ·\n [\n OpenCode MCP 服... ](http://www.runoob.com/opencode/opencode-mcp.html)\n\n\n ·\n [\n OpenCode LSP 服... ](http://www.runoob.com/opencode/opencode-lsp.html)\n\n\n ·\n [\n OpenCode 权限配置 ](http://www.runoob.com/opencode/opencode-permissions.html)\n\n\n ·\n [\n OpenCode 格式化... ](http://www.runoob.com/opencode/opencode-formatter.html)\n\n\n ·\n [\n OpenCode 自定义... ](http://www.runoob.com/opencode/opencode-commands.html)\n\n\n\n\n 站点信息\n\n\n ·\n [意见反馈](https://www.runoob.commailto:admin@runoob.com)\n\n\n ·\n [免责声明](https://www.runoob.com/disclaimer)\n\n\n ·\n [关于我们](https://www.runoob.com/aboutus)\n\n\n ·\n [文章归档](https://www.runoob.com/archives)\n\n\n\n\n\n\n\n **关注微信**\n\n\n\n \n\n\n\n\n\n\n Copyright © 2013-2026 **[菜鸟教程](https://www.runoob.com//www.runoob.com/)** \n **[runoob.com](https://www.runoob.com//www.runoob.com/)** All Rights Reserved. 备案号:[闽ICP备15012807号-1](https://beian.miit.gov.cn/)\n\n\n\n [ ](https://www.runoob.comjavascript:void(0))\n [](https://www.runoob.comjavascript:void(0))\n [](https://www.runoob.comjavascript:void(0))\n\n\n\n#### 微信关注\n\n `;
document.getElementById('md-content').innerHTML = marked.parse(md);
</script>
</body>
</html>