Skip to content

Markdown语法

约 5503 字大约 18 分钟

markdown

2025-03-28

标题H2

标题H3

标题H4

标题H5
标题H6

标题2 Badge Badge

标题3 Badge Badge

标题4 Badge Badge

正文内容。

@property CSS at-rule是 CSS Houdini API 的一部分,它允许开发者显式地定义他们的 CSS 自定义属性, 允许进行属性类型检查、设定默认值以及定义该自定义属性是否可以被继承。

@property 的出现,极大的增强了 CSS 的能力。

加粗:加粗文字

斜体: 斜体文字

删除文字

内容 标记

数学表达式: (2n1)-(2^{n-1}) ~ 2n112^{n-1} -1

rωr(yωω)=(yωω){(logy)r+i=1r(1)Ir(ri+1)(logy)riωi}\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right) = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^ Ir \cdots (r-i+1) (\log y)^{ri}} {\omega^i} \right\}

19th

H2O

内容居中

内容右对齐

  • 无序列表1
  • 无序列表2
  • 无序列表3
  1. 有序列表1
  2. 有序列表2
  3. 有序列表3
TablesAreCool
col 3 isright-aligned$1600
col 2 iscentered$12
zebra stripesare neat$1

引用内容

引用内容

链接

外部链接

plume

Badge:

  • info badge
  • tip badge
  • warning badge
  • danger badge

图标:

  • home -
  • vscode -
  • twitter -

demo wrapper:

示例

main
aside

代码:

const a = 1
const b = 2
const c = a + b

const obj = {
  toLong: {
    deep: {
      deep: {
        deep: {
          value: 'this is to long text. this is to long text. this is to long text. this is to long text.',
        }
      }
    }
  }
}

Code Blocks TwoSlash:

// @errors: 2339
const welcome = 'Tudo bem gente?'
const words = welcome.contains(' ')
import express from 'express'
const app = express()
app.get('/', (req, res) => {
  res.send
})
app.listen(3000)
import { createHighlighter } from 'shiki'

const highlighter = await createHighlighter({ themes: ['nord'], langs: ['javascript'] })
// @log: Custom log message
const a = 1
// @error: Custom error message
const b = 1
// @warn: Custom warning message
const c = 1
// @annotate: Custom annotation message
// @errors: 2540
interface Todo {
  title: string
}

const todo: Readonly<Todo> = {
  title: 'Delete inactive users'.toUpperCase(),
//  ^?
}

todo.title = 'Hello'

Number.parseInt('123', 10)
//      ^|

//
//
<script setup lang="ts">
import { ref } from 'vue'

const count = ref(0)
</script>

<template>
  <p>{{ count }}</p>
</template>

代码分组:

tab1
const a = 1
const b = 2
const c = a + b

代码块高亮:

function foo() {
  const a = 1

  console.log(a)

  const b = 2
  const c = 3

  console.log(a + b + c)
  console.log(a + b)
}

代码块聚焦:

function foo() {
  const a = 1
}

仅标题

注释

注释内容 link inline code

const a = 1
const b = 2
const c = a + b

信息

信息内容 link inline code

const a = 1
const b = 2
const c = a + b

提示

提示内容 link inline code

const a = 1
const b = 2
const c = a + b

警告

警告内容 link inline code

const a = 1
const b = 2
const c = a + b

错误

错误内容 link inline code

const a = 1
const b = 2
const c = a + b

重要

重要内容 link inline code

const a = 1
const b = 2
const c = a + b
详细标题

这里是内容。

GFM alert:

note

相关信息

info

提示

tip

注意

warning

警告

caution

重要

important

代码演示:

:::: demo title="常规示例" desc="一个常规示例"

HTML
<div id="app">
  <h3>vuepress-theme-plume</h3>
</div>

::::

选项卡:

标题1

内容区块

注意

标题1

内容区块

脚注:

脚注 1 链接[1]

脚注 2 链接[2]

行内的脚注[3] 定义。

重复的页脚定义[2:1]

Markdown 扩展语法

图标

github: 修改颜色: 修改大小: 修改大小颜色:

彩色图标

马克笔

一个提示 一个警告 一个错误 重要内容

隐秘文本

你知道吗, 鲁迅 曾说过:“ 我没说过这句话! ” 令我醍醐灌顶,深受启发,浑身迸发出无可匹敌的 力量!于是,我在床上翻了个身

缩写词

The HTML specification is maintained by the W3C.

内容注释

站点由 VuePress 驱动。

中国古代 四大名著 家喻户晓。

卡片

卡片标题

这里是卡片内容。

卡片标题 1

这里是卡片内容。

卡片标题 2

这里是卡片内容。

步骤

  1. 步骤 1

    console.log('Hello World!')
  2. 步骤 2

    这里是步骤 2 的相关内容

  3. 步骤 3

    提示

    提示容器

  4. 结束

文件树

docs

.vuepress

config.ts

page1.md

README.md

theme一个 主题 目录

client

components

Navbar.vue

composables

useNavbar.ts

styles

navbar.css

config.ts

node

package.json

pnpm-lock.yaml

.gitignore

README.md

docs

.vuepress

config.ts

page1.md

README.md

package.json

选项组

npm

npm 应该与 Node.js 被一同安装。

时间线

节点一

正文内容

2025-03-20

节点二

正文内容

2025-02-21

节点三

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

节点一

正文内容

2025-03-20

节点二

正文内容

2025-04-20

节点三

正文内容

2025-01-22

节点四

正文内容

2025-01-22

示例容器

hero

标题

//### 三级标题

这是示例容器中的内容。

这是标题

这是段落

折叠面板

标题 1

标题 2

标题 1

正文内容

标题 2

正文内容

标题 1

标题 2

标题 3

标题 1

标题 2

正文内容

标题 3

正文内容

标题 1

正文内容

标题 2

标题 3

正文内容

npmTo 容器

pnpm
pnpm add -D vuepress vuepress-theme-plume
npm
npm install -D vuepress vuepress-theme-plume
npm
npm install && npm run docs:dev
npm
npm i -D vue
npm i --save-peer vuepress
npm i typescript
npm
npm run docs:dev -- --clean-cache
pnpm
pnpm install --frozen-lockfile

Can I Use

代码块高亮

C
#include <stdio.h>

#define ARR_LEN 7

void qsort(int v[], int left, int right);
void printArr(int v[], int len);

int main()
{
	int i;
	int v[ARR_LEN] = { 4, 3, 1, 7, 9, 6, 2 };
	printArr(v, ARR_LEN);
	qsort(v, 0, ARR_LEN-1);
	printArr(v, ARR_LEN);
	return 0;
}

void qsort(int v[], int left, int right)
{
	int i, last;
	void swap(int v[], int i, int j);

	if (left >= right)
		return;
	swap(v, left, (left + right) / 2);
	last = left;
	for (i = left+1; i <= right; i++)
		if (v[i] < v[left])
			swap(v, ++last, i);
	swap(v, left, last);
	qsort(v, left, last-1);
	qsort(v, last+1, right);
}

void swap(int v[], int i, int j)
{
	int temp;

	temp = v[i];
	v[i] = v[j];
	v[j] = temp;
}

void printArr(int v[], int len)
{
	int i;
	for (i = 0; i < len; i++)
		printf("%d ", v[i]);
	printf("\n");
}
HTML
<!DOCTYPE html>
<html lang="en-us">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>MDN Web Docs Example: Toggling full-screen mode</title>
    <link rel="stylesheet" href="styles.css">
    <style class="editable">
        video::backdrop {
          background-color: #448;
        }
    </style>

    <!-- import the webpage's javascript file -->
    <script src="script.js" defer></script>
  </head>
  <body>
    <section class="preview">
      <video controls
        src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
        poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217"
        width="620">

        Sorry, your browser doesn't support embedded videos.  Time to upgrade!

      </video>
    </section>

<textarea class="playable playable-css" style="height: 100px;">
video::backdrop {
  background-color: #448;
}
</textarea>

<textarea class="playable playable-html" style="height: 200px;">
<video controls
  src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
  poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217"
  width="620">
Sorry, your browser doesn't support embedded videos.  Time to upgrade!
</video>
</textarea>

    <div class="playable-buttons">
        <input id="reset" type="button" value="Reset" />
      </div>
    </body>
    <script src="playable.js"></script>
  </body>
</html>

代码块标题

package.json
{
  "name": "vuepress-theme-plume"
}

代码行号

// 启用行号
const line2 = 'This is line 2'
const line3 = 'This is line 3'
// 行号已禁用
const line3 = 'This is line 3'
const line4 = 'This is line 4'
// 行号已启用,并从 2 开始
const line3 = 'This is line 3'
const line4 = 'This is line 4'

代码分组

config.js
/**
 * @type {import('vuepress').UserConfig}
 */
const config = {
  // ..
}

export default config
config.ts
import type { UserConfig } from 'vuepress'

const config: UserConfig = {
  // ..
}

export default config

  1. 脚注 可以包含特殊标记

    也可以由多个段落组成 ↩︎

  2. 脚注文字。 ↩︎ ↩︎

  3. 行内脚注文本 ↩︎

贡献者

更新日志

2025/5/4 15:58
查看所有更新日志
  • a5a4e-添加umami网站浏览量统计