Skip to content
Custom alignment

Custom alignment

Posted Updated
By 廿四1 min Read

Settings

.vitepress/config.ts
ts
import { defineConfig } from 'vitepress-theme-niansi'

export default defineConfig({
  markdown: {
    plugins: {
      align: true
    }
  }
})

Syntax

md
::: left
Contents to align left
:::

::: center
Contents to align center
:::

::: right
Contents to align right
:::

Contents to align left

Contents to align center

Contents to align right

Demo
md
::: left
Contents to align left
:::

::: center
Contents to align center
:::

::: right
Contents to align right
:::

Changelog

2026-04-19 16:23
View All Changelog