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主题。

View demo 查看演示 Download Source 下载源

安装 (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)

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 主题

你可能感兴趣的:(python,linux,java,vue,js)