diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts
index 43cf279c..67ddda33 100644
--- a/docs/.vuepress/config.ts
+++ b/docs/.vuepress/config.ts
@@ -2,6 +2,7 @@ import * as path from 'node:path'
import { type UserConfig, defineUserConfig } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'
import { addViteOptimizeDepsInclude, addViteSsrExternal } from '@vuepress/helper'
+import { peerDependencies } from '../package.json'
import { theme } from './theme.js'
export default defineUserConfig({
@@ -27,6 +28,10 @@ export default defineUserConfig({
addViteSsrExternal(bundlerOptions, app, '@simonwep/pickr')
},
+ define: {
+ __VUEPRESS_VERSION__: peerDependencies.vuepress,
+ },
+
bundler: viteBundler(),
theme,
diff --git a/docs/.vuepress/themes/components/ThemeColors.vue b/docs/.vuepress/themes/components/ThemeColors.vue
index 16db3e78..f4fc8078 100644
--- a/docs/.vuepress/themes/components/ThemeColors.vue
+++ b/docs/.vuepress/themes/components/ThemeColors.vue
@@ -16,8 +16,10 @@ const { lightColors, darkColors, css, reset } = useThemeColors()
{{ name }}
- {{ color.name }}
- {{ color.desc }}
+
+
{{ color.name }}
+ {{ color.desc }}
+
@@ -27,8 +29,10 @@ const { lightColors, darkColors, css, reset } = useThemeColors()
{{ name }}
- {{ color.name }}
- {{ color.desc }}
+
+
{{ color.name }}
+ {{ color.desc }}
+
diff --git a/docs/1.示例/照片类作品示例.md b/docs/1.示例/照片类作品示例.md
new file mode 100644
index 00000000..6b9ca495
--- /dev/null
+++ b/docs/1.示例/照片类作品示例.md
@@ -0,0 +1,70 @@
+---
+title: 照片类作品示例
+author: Plume Theme
+createTime: 2024/08/17 14:30:23
+permalink: /article/30995vcd/
+---
+
+
+
+## 单列照片
+
+```md :no-line-numbers
+
+```
+
+
+
+## 双列照片
+
+```md :no-line-numbers
+
+
+
+```
+
+
+
+
+
+## 三列照片
+
+```md :no-line-numbers
+
+
+
+```
+
+
+
+
+
+## 不同尺寸设备适配
+
+调整窗口大小以观察效果
+
+```md :no-line-numbers
+
+
+
+```
+
+
+
+
diff --git a/docs/notes/theme/guide/功能/组件.md b/docs/notes/theme/guide/功能/组件.md
index 657e0b36..b920b32e 100644
--- a/docs/notes/theme/guide/功能/组件.md
+++ b/docs/notes/theme/guide/功能/组件.md
@@ -28,7 +28,7 @@ VuePress 支持在 Markdown 文件中使用 组件。
**输入:**
-```md
+```md :no-line-numbers
- VuePress -
- VuePress -
- VuePress -
@@ -58,7 +58,7 @@ VuePress 支持在 Markdown 文件中使用 组件。
**输入:**
-```md
+```md :no-line-numbers
- home -
- vscode -
- twitter -
@@ -79,7 +79,7 @@ VuePress 支持在 Markdown 文件中使用 组件。
::: code-tabs
@tab .vuepress/config.ts
-```ts
+```ts :no-line-numbers
export default defineUserConfig({
theme: plumeTheme({
plugins: {
@@ -103,7 +103,7 @@ export default defineUserConfig({
**输入:**
-```md
+```md :no-line-numbers
- 鼠标悬停 - 悬停时可见
- 点击 - 点击时可见
```
@@ -135,7 +135,7 @@ export default defineUserConfig({
**输入:**
-```md
+```md :no-line-numbers
这里是卡片内容。
@@ -183,7 +183,7 @@ export default defineUserConfig({
**输入:**
-```md
+```md :no-line-numbers
```
@@ -193,13 +193,109 @@ export default defineUserConfig({
+## 图片卡片
+
+使用 `` 组件在页面中显示图片卡片。
+
+图片卡片 有别于 markdown 的 普通插入图片方式,它展示与图片相关的更多信息,包括标题、描述、作者、链接等。
+适用于如 摄影作品、设计作品、宣传海报 等场景。
+
+### Props
+
+| 名称 | 类型 | 默认值 | 说明 |
+| ----------- | -------------------------- | ------ | --------------------------------------- |
+| image | `string` | `''` | 必填,图片链接 |
+| title | `string` | `''` | 可选,标题 (展示其它信息需要依赖此属性) |
+| description | `string` | `''` | 可选,描述 |
+| author | `string` | `''` | 可选,作者 |
+| href | `string` | `''` | 可选,链接 |
+| date | `string \| Date \| number` | `''` | 可选,日期 |
+
+**输入:**
+
+```md :no-line-numbers
+
+```
+
+**输出:**
+
+
+
+还可以放到 `` 组件中。
+
+**输入:**
+
+```md :no-line-numbers
+
+
+
+
+```
+
+**输出:**
+
+
+
+
+
+
+[查看 照片类作品示例](../../../../1.示例/照片类作品示例.md)
+
## 卡片排列容器
当你需要将多个卡片排列,可以使用 `` 组件。在空间足够时,多个卡片会自动排列。
+### Props
+
+| 名称 | 类型 | 默认值 | 说明 |
+| :--- | :----------------------------------------------- | :----- | :------------- |
+| cols | `number \| Record<'sm' \| 'md' \| 'lg', number>` | `2` | 卡片排列列数。 |
+
**输入:**
-```md
+```md :no-line-numbers
这里是卡片内容。
diff --git a/docs/notes/theme/guide/安装与使用.md b/docs/notes/theme/guide/安装与使用.md
index 7020bfc9..7ac4ba46 100644
--- a/docs/notes/theme/guide/安装与使用.md
+++ b/docs/notes/theme/guide/安装与使用.md
@@ -9,6 +9,10 @@ tags:
- 快速开始
---
+
+
## 依赖环境
- [Node.js v18.20.0+](https://nodejs.org/)
@@ -94,7 +98,7 @@ tags:
:::
:::warning
- 主题当前版本 已适配至 `vuepress@2.0.0-rc.14`,你应该安装这个版本的 VuePress。
+ 主题当前版本 已适配至 vuepress@{{ vuepressVersion }},你应该安装这个版本的 VuePress。
高于或低于这个版本,可能会存在潜在的兼容性问题。
:::
@@ -160,7 +164,7 @@ tags:
:::
:::warning
- 无论是否需要使用 **多语言** ,你都应该为 VuePress 配置 正确 `lang` 选项值。
+ 无论是否需要使用 __多语言__ ,你都应该为 VuePress 配置 正确 `lang` 选项值。
主题需要根据 `lang` 选项来确定语言环境文本。
:::
diff --git a/docs/notes/theme/guide/知识笔记.md b/docs/notes/theme/guide/知识笔记.md
index 922e7381..de15025e 100644
--- a/docs/notes/theme/guide/知识笔记.md
+++ b/docs/notes/theme/guide/知识笔记.md
@@ -22,13 +22,13 @@ tags:
示例:
-```
+``` :no-line-numbers
{sourceDir}/
├─ notes/
- ├─ typescript/
- │ ├─ foo.md
- ├─ rust/
- │ ├─ foo.md
+│ ├─ typescript/
+│ │ └─ foo.md
+│ └─ rust/
+│ └─ foo.md
```
其中,`typescript` 和 `rust` 为目录名,各自独立保存与之相关的 markdown 文件。