自定义对齐
小于 1 分钟
通过对 vuepress-plugin-container
进行额外的配置注入,你可以使用
::: center
要居中的段落
:::
::: right
要居右的段落
:::
来对你的段落对齐进行自定义。
配置
// .vuepress/config.ts
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";
export default defineUserConfig({
theme: hopeTheme({
plugins: {
mdEnhance: {
align: true,
},
},
}),
});
// .vuepress/config.js
import { hopeTheme } from "vuepress-theme-hope";
export default {
theme: hopeTheme({
plugins: {
mdEnhance: {
align: true,
},
},
}),
};
演示
:::: danger W.I.P
vuepress-theme-hope v2 仍在制作中,API 可能会有
::: center
重大的变动。
:::
如果你在使用过程中遇到了 bug,可以
::: right
[提一个 issue](https://github.com/vuepress-theme-hope/vuepress-theme-hope/issues)。
:::
::::