Search code examples
cssreactjssassmultilingualdocusaurus

How to change the body direction of docs in Docusaurus?


I run my Docusaurus 2 site without a landing page and instead redirect to the first .md file in the sidebar. For doing so, I followed the instruction in the link below and it worked really well:

https://v2.docusaurus.io/docs/next/configuration#docs-only-mode

Now, I want to have a multi-language website, English and Persian. The Persian language requires the website to be right-aligned, but I do not know how to do so. I do not use any pages in my project, and I only use a .js file in the pages folder to redirect to the docs.

Could anyone please help me to solve this problem?


Solution

  • You would have to swizzle the components to handle this. Unfortunately we haven't built a way for translations into Docusaurus 2, but we'll take into account RTL languages when we build it.