Page
FrontMatter
你可以使用 front-matter 定制页面属性。
You can custom page by front-matter.
titleTemplate
md
---
title: Cool
titleTemplate: '%s - Valaxy'
---
---
title: Cool
titleTemplate: '%s - Valaxy'
---
这样可以使 HTML 标题变为 Cool - Valaxy
。
You will get html title Cool - Valaxy
.
页面加密
WARNING注意
加密依赖于浏览器原生 Web Crypto API | MDN, 其仅在 HTTPS 中可用。
ts
// site.config.ts
import { defineSiteConfig } from 'valaxy'
export default defineSiteConfig({
encrypt: {
// 开启加密,默认关闭
enable: true
// algorithm
// iv
// salt
}
})
// site.config.ts
import { defineSiteConfig } from 'valaxy'
export default defineSiteConfig({
encrypt: {
// 开启加密,默认关闭
enable: true
// algorithm
// iv
// salt
}
})
在对应需要加密页面的 frontmatter 中添加 password: YourPassword
即可。
当 encrypt.enable
为 true
,且页面中密码 password
存在时,默认开启加密。
md
---
password: valaxy
---
---
password: valaxy
---
其它
toc: false
: 隐藏目录aside: false
: 隐藏右侧文章导航栏codeHeightLimit: 300
: 代码块高度限制(300px)
Other
toc: false
: Hide TOCaside: false
: Hide Right AsidecodeHeightLimit: 300
: Code block height limit(300px)