Custom alignment
Less than 1 minute
Customize content alignment.
Settings
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";
export default defineUserConfig({
theme: hopeTheme({
markdown: {
align: true,
},
}),
});
Syntax
::: left
Contents to align left
:::
::: center
Contents to align center
:::
::: right
Contents to align right
:::
::: justify
Contents to align justify
:::
Nesting
Nesting can be done by increasing marker number of outer container:
Center contents...
Left contents...
Center contents...
Nesting can be done by increasing marker number of outer container:
:::: center
Center contents...
::: left
Left contents...
:::
Center contents...
::::
Escaping
::: left
Escaping can be done by adding \
to escape the marker
:::
\::: left
Escaping can be done by adding `\` to escape the marker
:::
Demo
Real life example
Caution
VuePress Theme Hope V2 version is still in W.I.P, the API may have
Significant changes.
If you meet a bug during usage, you can
:::: caution
VuePress Theme Hope V2 version is still in W.I.P, the API may have
::: center
Significant changes.
:::
If you meet a bug during usage, you can
::: right
[open an issue](https://github.com/vuepress-theme-hope/vuepress-theme-hope/issues).
:::
::::
Changelog
2/18/25, 7:08 AM
View All Changelog
b1230
-on22787
-onb41c0
-on54c46
-on55ea3
-on757fd
-on83bff
-on2a306
-one45fb
-on8174c
-on2fa50
-on3c8d6
-on9856d
-on23515
-on48bca
-on9cdd7
-on63d09
-onfd395
-on1eb77
-on259cc
-onf6ff0
-on3c199
-onace60
-on688d8
-on8e875
-on