Skip to content
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

Add right to left stylesheet #3137

Closed
mehdisadeghi opened this issue Nov 22, 2014 · 8 comments
Closed

Add right to left stylesheet #3137

mehdisadeghi opened this issue Nov 22, 2014 · 8 comments

Comments

@mehdisadeghi
Copy link

I would like to see RTL support in jekyll. Right now I add a new rtl.scss to change direction and do some css to have a proper RTL output. How about adding this file to default styles and having a new direction keyword in config file to change direction (which defaults to LTR)? If this suffices I will send a pull request. Please let me know your ideas.

@parkr
Copy link
Member

parkr commented Nov 22, 2014

You're talking about in the jekyll new site?

@mehdisadeghi
Copy link
Author

Yes right. Right now every user willing to use Persian, Arabic or Hebrew should change the stylesheet to make the contents look properly in right to left context. So I thought that might be a good idea to add it to jekyll generated website by default, then users will know where to tweak RTL related stylesheet. I have more RTL issues which I have encountered during building my own website with jekyll and I will register them in separate tickets.

@parkr
Copy link
Member

parkr commented Nov 22, 2014

I think it should be an option – either we write a RTL or LTR stylesheet to the new site. I suspect LTR should be the default, but I can see a RTL option being valuable.

@mehdisadeghi
Copy link
Author

I could think of something like jekyll new --locale=fa_IR (or similar locales) or jekyll new --rtl. This will in turn generate the fa_IR.scss or rtl.scss and add it to style sheets, I prefer no impact on current styles. Having --locate switch will let us to have separate styles based on locales.

@navidkashani
Copy link

One method that can be used is writing scss with direction control , see: https://github.com/parhumm/sass-direction-controller

@mehdisadeghi
Copy link
Author

@navidkashani I think it is a good idea. Then based on a keyword in _config.yml file we can activate it.

@parkr
Copy link
Member

parkr commented Dec 13, 2015

This is not currently in the roadmap. If someone were to propose it, I would certainly accept a PR that added a --rtl flag to jekyll new and that added the RTL CSS file to lib/site_template for use with that flag.

That said, this is not something the Core Team has time to work on, so I'm going to close. If someone comes across my comment and has time to implement, please send a PR and reference this issue. Thanks!

@parkr parkr closed this as completed Dec 13, 2015
@tech-chieftain
Copy link

I altered the basic Jekyll theme's direction and style to help people speed things up.
Here's the repository https://github.com/tehchieftain/jekyll-arabic.git

I know this isn't a real RTL support, but it can save sometime for people to use it.

@jekyll jekyll locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants