水印
小于 1 分钟
VuePress Theme Hope 允许你通过 @vuepress/plugin-watermark
添加水印。
介绍
You can customize the watermark behavior with plugins.watermark
in theme options, or with watermark
in page frontmatter.
The simplest way is to set it to true
to get a site name watermark:
- Enable globally:
你可以通过在主题选项中设置 plugins.watermark
或在页面 Frontmatter 中设置 watermark
来自定义水印行为。
最简单的方法是将其设置为 true
以获取站点名称水印:
全局启用:
import {
hopeTheme} from "vuepress-theme-hope"; export defaulthopeTheme({plugins: {watermark: true, }, });在特定页面启用:
--- watermark: true ---
你也可以完全自定义水印:
全局自定义:
import {
hopeTheme} from "vuepress-theme-hope"; export defaulthopeTheme({plugins: {watermark: {watermarkOptions: {content: "自定义内容",movable: true, // 其他选项 }, }, }, });自定义某个页面:
--- watermark: width: 200 height: 200 content: Your content opacity: 0.5 ---
有关详细的配置,请参见 水印插件文档。
更新日志
2025/4/14 07:38
查看所有更新日志
9e7b3
-于253d1
-于bdfcb
-于04b1b
-于cc7db
-于