chore: tweak
This commit is contained in:
parent
ec00e78362
commit
4c63fd38da
@ -7,16 +7,16 @@
|
||||
|
||||
- 主题于 `theme` 目录中进行开发维护。
|
||||
- 插件于 `plugins` 目录中进行开发维护。
|
||||
- 示例于 `docs` 目录中进行开发维护。
|
||||
- 文档于 `docs` 目录中进行开发维护。
|
||||
|
||||
在 `plugins` 目录中:
|
||||
|
||||
- `plugin-auto-frontmatter` : 为 md 文件自动添加 frontmatter。
|
||||
- `plugin-blog-data`: 生成 blog 文章列表数据
|
||||
- `plugin-notes-data`: 生成 notes 数据,管理不同 note 的 `sidebar` 的数据
|
||||
- `plugin-caniuse`: 添加 `caniuse` 内容容器
|
||||
- ~~`plugin-caniuse`: 添加 `caniuse` 内容容器,已弃用,不再维护~~
|
||||
- `plugin-content-update`: 重写 `Content` 组件,提供 `onContentUpdated` 钩子
|
||||
- `plugin-copy-code`: 为 代码块添加 复制 按钮,并适配 `shikiji`
|
||||
- ~~`plugin-copy-code`: 为 代码块添加 复制 按钮,并适配 `shikiji`,已弃用,不再维护~~
|
||||
- `plugin-search`: 为主题提供 全文模糊搜索 功能
|
||||
- `plugin-shikiji`: 代码高亮插件,支持 highlight、diff、focus、error level
|
||||
- `plugin-iconify`: 添加全局组件 `Iconify`
|
||||
@ -28,7 +28,7 @@
|
||||
开发要求:
|
||||
|
||||
- [Node.js](http://nodejs.org/) version 18.16.0+
|
||||
- [pnpm](https://pnpm.io/zh/) version 8+
|
||||
- [pnpm](https://pnpm.io/zh/) version 9+
|
||||
|
||||
克隆代码仓库,并安装依赖:
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import HomeHero from 'vuepress-theme-plume/client/components/Home/HomeHero.vue'
|
||||
import { useDarkMode } from 'vuepress-theme-plume/client/composables/darkMode'
|
||||
import HomeHero from 'vuepress-theme-plume/components/Home/HomeHero.vue'
|
||||
import { useDarkMode } from 'vuepress-theme-plume/composables'
|
||||
import type { PlumeThemeHomeHeroTintPlate } from 'vuepress-theme-plume/client'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import DemoWrapper from './DemoWrapper.vue'
|
||||
|
||||
@ -23,6 +23,7 @@ export default defineUserConfig({
|
||||
```
|
||||
|
||||
你还可以通过 `:line-numbers` / `:no-line-numbers` 来控制当前代码块是否显示代码行号。
|
||||
还可以通过在 `:line-numbers` 之后添加 `=` 来自定义起始行号,例如 `:line-numbers=2` 表示代码块中的行号从 `2` 开始。
|
||||
|
||||
**输入:**
|
||||
|
||||
@ -38,6 +39,12 @@ const line3 = 'This is line 3'
|
||||
const line3 = 'This is line 3'
|
||||
const line4 = 'This is line 4'
|
||||
```
|
||||
|
||||
```ts:line-numbers=2
|
||||
// 行号已启用,并从 2 开始
|
||||
const line3 = 'This is line 3'
|
||||
const line4 = 'This is line 4'
|
||||
```
|
||||
````
|
||||
|
||||
**输出:**
|
||||
@ -54,6 +61,12 @@ const line3 = 'This is line 3'
|
||||
const line4 = 'This is line 4'
|
||||
```
|
||||
|
||||
```ts:line-numbers=2
|
||||
// 行号已启用,并从 2 开始
|
||||
const line3 = 'This is line 3'
|
||||
const line4 = 'This is line 4'
|
||||
```
|
||||
|
||||
## 在代码块中实现行高亮
|
||||
|
||||
在 `[lang]` 之后紧跟随 `{xxxx}` ,可以实现行高亮,其中 `xxx` 表示要高亮的行号。
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"vuepress": "2.0.0-rc.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/json": "^2.2.214",
|
||||
"@iconify/json": "^2.2.215",
|
||||
"@vuepress/bundler-vite": "2.0.0-rc.12",
|
||||
"anywhere": "^1.6.0",
|
||||
"chart.js": "^4.4.3",
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18 || >=20.0.0",
|
||||
"pnpm": ">=8"
|
||||
"pnpm": ">=9"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run clean && pnpm run build:package",
|
||||
@ -56,10 +56,10 @@
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.5",
|
||||
"rimraf": "^5.0.7",
|
||||
"stylelint": "^16.6.0",
|
||||
"stylelint": "^16.6.1",
|
||||
"tsconfig-vuepress": "^4.5.0",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.11"
|
||||
"vite": "5.2.11"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "eslint --fix"
|
||||
|
||||
@ -46,19 +46,19 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/utils": "^2.1.23",
|
||||
"@iconify/utils": "^2.1.24",
|
||||
"@vuepress/helper": "2.0.0-rc.33",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@vueuse/core": "^10.10.0",
|
||||
"local-pkg": "^0.5.0",
|
||||
"markdown-it-container": "^4.0.0",
|
||||
"nanoid": "^5.0.7",
|
||||
"shiki": "^1.6.0",
|
||||
"tm-grammars": "^1.12.4",
|
||||
"shiki": "^1.6.1",
|
||||
"tm-grammars": "^1.12.5",
|
||||
"tm-themes": "^1.4.3",
|
||||
"vue": "^3.4.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/json": "^2.2.214",
|
||||
"@iconify/json": "^2.2.215",
|
||||
"@types/markdown-it": "^14.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@ -52,11 +52,11 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"esbuild": "^0.21.4",
|
||||
"execa": "^9.1.0",
|
||||
"netlify-cli": "^17.23.8",
|
||||
"netlify-cli": "^17.25.0",
|
||||
"portfinder": "^1.0.32"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.12.12"
|
||||
"@types/node": "^20.12.13"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@ -41,8 +41,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vuepress/helper": "2.0.0-rc.33",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@vueuse/integrations": "^10.9.0",
|
||||
"@vueuse/core": "^10.10.0",
|
||||
"@vueuse/integrations": "^10.10.0",
|
||||
"chokidar": "^3.6.0",
|
||||
"focus-trap": "^7.5.4",
|
||||
"mark.js": "^8.11.1",
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
"@types/hast": "^3.0.4",
|
||||
"@vuepress/helper": "2.0.0-rc.33",
|
||||
"floating-vue": "^5.2.2",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.1",
|
||||
"mdast-util-gfm": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.1.0",
|
||||
"nanoid": "^5.0.7",
|
||||
|
||||
477
pnpm-lock.yaml
generated
477
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -30,14 +30,14 @@
|
||||
"types": "./lib/client/index.d.ts",
|
||||
"import": "./lib/client/index.js"
|
||||
},
|
||||
"./client/components/*": {
|
||||
"./components/*": {
|
||||
"import": "./lib/client/components/*"
|
||||
},
|
||||
"./client/composables": {
|
||||
"./composables": {
|
||||
"types": "./lib/client/composables/index.d.ts",
|
||||
"import": "./lib/client/composables/index.js"
|
||||
},
|
||||
"./client/composables/*": {
|
||||
"./composables/*": {
|
||||
"types": "./lib/client/composables/*.d.ts",
|
||||
"import": "./lib/client/composables/*.js"
|
||||
},
|
||||
|
||||
@ -70,7 +70,7 @@ onMounted(() => {
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
@media (min-width: 1440px) {
|
||||
.plume-footer {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
"@internal/*": ["./docs/.vuepress/.temp/internal/*"],
|
||||
"@vuepress-plume/*": ["./plugins/*/src/node/index.ts"],
|
||||
"vuepress-theme-plume": ["./theme/src/node/index.ts"],
|
||||
"vuepress-theme-plume/composables": ["./theme/src/client/composables/index.ts"],
|
||||
"@vuepress-plume/*/client": ["./plugins/*/src/client/index.ts"],
|
||||
"vuepress-plugin-netlify-functions": [
|
||||
"./plugins/plugin-netlify-functions/src/node/index.ts"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user