主题 Yun 自定义
编辑链接
为文章添加「在 GitHub 中编辑」链接。
ts
import type { ThemeConfig } from 'valaxy-theme-yun'
import { defineValaxyConfig } from 'valaxy'
export default defineValaxyConfig<ThemeConfig>({
themeConfig: {
editLink: {
pattern: 'https://github.com/user/repo/edit/main/:path',
text: '在 GitHub 上编辑此页',
},
},
})大纲标题
目录标题文本。
ts
import type { ThemeConfig } from 'valaxy-theme-yun'
import { defineValaxyConfig } from 'valaxy'
export default defineValaxyConfig<ThemeConfig>({
themeConfig: {
/**
* @default 'On this page'
*/
outlineTitle: '本页目录',
},
})样式
通过创建 styles/index.ts 覆盖主题样式:
ts
import './vars.scss'scss
:root {
--yun-bg-img: url("https://example.com/bg.jpg");
--yun-sidebar-bg-img: url("https://example.com/sidebar.jpg");
--yun-c-cloud: pink;
}