Skip to content

remove text-direction from book.toml #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025

Conversation

szabgab
Copy link

@szabgab szabgab commented Apr 11, 2025

setting the language to "fa" should make the book rtl

As far as I know text-direction = "rtl" is now unnecessary as the language = "fa" setting should already sets the book to rtl. https://github.com/rust-lang/mdBook/blob/3052fe38270bb370dcf54009d450c5395537d975/src/config.rs#L466

Currently this is the only mdboik I am aware of that uses this option. See https://mdbooks.code-maven.com/text-direction

Before I propose the change to the mdbook project, I'd like to ask you to verify that indeed the language = "fa" setting is enough for you as well.

setting the language to "fa" should make the book rtl
@drunkleen
Copy link

You're absolutely right, setting language = "fa" in book.toml does indeed render the book in RTL format without needing the explicit text-direction = "rtl" setting.
I appreciate you bringing this to my attention. I added that line because I had some experience with older versions of mdBook and faced issues with text align in Persian and based on that, I added that setting.

@drunkleen drunkleen merged commit 0a5aa17 into persian-rust:main May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants