vuepress 主题_支持多种颜色主题的VuePress主题

vuepress 主题

u (Yuu)

A VuePress theme that supports multiple color themes and some other useful features. Heavily based off of the default VuePress theme.

一个VuePress主题,它支持多个颜色主题和一些其他有用的功能。 很大程度上基于默认的VuePress主题。

安装 (Installation)

You can add Yuu to your current VuePress project by running:

您可以通过运行以下命令将Yuu添加到当前的VuePress项目中:

yarn add vuepress-theme-yuu

# or if you prefer npm
npm install vuepress-theme-yuu

功能/配置 (Features/configuration)

Yuu user settings dropdown menu

Everything that's supported in the 0.14.1 version of the default VuePress theme is supported on Yuu. Updates will be made occassionally to try to keep up with the default's themes features and CSS and etc.

Yuu支持默认VuePress主题的0.14.1版本中支持的所有内容。 有时会进行更新,以尝试跟上默认主题的功能和CSS等。

Below is a list of the additional configurable features Yuu has to offer.

以下是Yuu提供的其他可配置功能的列表。

黑暗主题 (Dark theme)

Yuu, by default, comes with an option to allow users to switch to a dark theme. You can disable this via the disableDarkTheme option.

默认情况下,Yuu带有允许用户切换到深色主题的选项。 您可以通过disableDarkTheme选项禁用它。

module.exports = {
	themeConfig: {
		yuu: {
			disableDarkTheme: true,
		},
	},
};

颜色主题 (Color themes)

Yuu currently supports 3 color themes: the default (green) theme, a blue theme, and a red theme. By default, any additional themes will be included. If you only want to use certain themes, you'll need to be explicit about which ones.

Yuu当前支持3种颜色主题:默认(绿色)主题,蓝色主题和红色主题。 默认情况下,将包括所有其他主题。 如果只想使用某些主题,则需要明确说明哪些主题。

module.exports = {
	themeConfig: {
		yuu: {
			colorThemes: ['red'],
		},
	},
};
每页强制使用颜色主题 (Forced color themes per page)

You can force themes on a per page basis as well. Using YAML front matter on the page(s) you want to display a specific theme:

您也可以按页面强制主题。 在要显示特定主题的页面上使用YAML前置事项:

---
forceTheme: blue
---
禁止强迫主题被忽略 (Disallowing forced themes from being ignored)

Users will still be able ignore forced themes via the user settings dropdown menu. You can disable this via the disableThemeIgnore option.

通过用户设置下拉菜单,用户仍然可以忽略强制主题。 您可以通过disableThemeIgnore选项禁用它。

module.exports = {
	themeConfig: {
		yuu: {
			disableThemeIgnore: true,
		},
	},
};

翻译自: https://vuejsexamples.com/a-vuepress-theme-that-supports-multiple-color-themes/

vuepress 主题

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值