RTL
This plugin sets text direction to RTL on configured locales.
Usage
npm i -D @vuepress/plugin-rtl@nextimport { rtlPlugin } from '@vuepress/plugin-rtl'
export default {
plugins: [
rtlPlugin({
// options
locales: ['/ar/'],
}),
],
}Demo
Options
locales
string[]Default
['/']RTL locale paths to enable RTL layout.
selector
SelectorOptionsDefault
{ 'html': { dir: 'rtl' } }Selector configuration to enable RTL layout. The default settings mean that the dir attribute of the html element will be set to rtl in RTL locales.
Its type is:
interface SelectorOptions {
[cssSelector: string]: {
[attr: string]: string
}
}