使用自定义锚点
title: Blogging Like a Hacker lang: en-US
表格
| Tables | Are | Cool |
|---|---|---|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
表情
🎉 💯
目录
信息
This is an info box.
提示
This is a tip.
警告
This is a warning.
危险
This is a dangerous warning.
详细信息
This is a details block.
STOP
危险区域,请勿继续
点我查看代码
js
console.log('Hello, VitePress!')Wraps in a
123
js
export default {
name: 'HelloWorld'
}html
<ul>
<li v-for="todo in todos" :key="todo.id">
{{ todo.text }}
</li>
</ul>ts
// 默认禁用行号
const line2 = 'This is line 2'
const line3 = 'This is line 3'ts
// 启用行号
const line2 = 'This is line 2'
const line3 = 'This is line 3'ts
// 行号已启用,并从 2 开始
const line3 = 'This is line 3'
const line4 = 'This is line 4'title: Docs with VitePress editLink: true
2
123
{
"logo": "/favicon.svg",
"search": {
"provider": "local"
},
"lastUpdated": {
"text": "Updated at",
"formatOptions": {
"dateStyle": "full",
"timeStyle": "medium"
}
},
"carbonAds": {
"code": "your-carbon-code",
"placement": "your-carbon-placement"
},
"nav": [
{
"text": "首页",
"link": "/"
},
{
"text": "Examples",
"link": "/markdown-examples"
},
{
"text": "百度",
"link": "https://www.baidu.com",
"target": "_self",
"rel": "sponsored"
}
],
"sidebar": [
{
"text": "Examples",
"items": [
{
"text": "Markdown Examples",
"link": "/markdown-examples"
},
{
"text": "Runtime API Examples",
"link": "/api-examples"
},
{
"text": "测试",
"link": "/test-examples"
},
{
"text": "我的",
"link": "/my"
}
]
}
],
"socialLinks": [
{
"icon": "github",
"link": "https://github.com/vuejs/vitepress"
},
{
"icon": "123",
"link": "https://github.com/vuejs/vitepress",
"ariaLabel": "cool link"
}
],
"footer": {
"message": "Released under the MIT License.",
"copyright": " <a href=\"https://beian.miit.gov.cn/\">晋ICP备2024027586号</a>"
}
}{
"title": "使用自定义锚点",
"description": "",
"frontmatter": {},
"headers": [],
"relativePath": "test-examples.md",
"filePath": "test-examples.md",
"lastUpdated": 1763651183000
}{}这是我的组件
This {{ will be displayed as-is }}
{{ This will be displayed as-is }}`
js
Hello 2.scss and .sass
npm install -D sass
.less
npm install -D less
.styl and .stylus
npm install -D stylus