Skip to content

Conversation

@davidazad1
Copy link

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (refactoring and improving code)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Description

This pull request introduces support for right-to-left (RTL) language direction in the Jekyll Chirpy theme. The changes include:

  1. Added a new direction configuration option in _config.yml to allow users to set the direction of the webpage (ltr for left-to-right or rtl for right-to-left).
  2. Updated multiple template files (_includes/*.html and _layouts/default.html) to dynamically apply the dir attribute based on the site.direction setting. This ensures proper rendering for RTL languages.

The default direction is set to ltr if the direction option is not specified in _config.yml.

Additional context

This addiction does not introduce any breaking changes and is fully compatible with existing functionality. The direction can set by setting the direction parameter in the site configuration.

Copy link
Owner

@cotes2020 cotes2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this feature. However, there still seems to be quite a bit of work to do to complete it:

  1. The elements in the sidebar do not have consistent right margins, and the spacing of the social icons at the bottom is uneven.
  2. The positions of the breadcrumb and search input box in the top bar are reversed.
  3. The metadata in the homepage article list does not follow the right-to-left order.
  1. The dates on the archive page are stacked together, and the vertical line of the timeline is also separated from the entries on the left and right.

@cotes2020 cotes2020 linked an issue Feb 10, 2025 that may be closed by this pull request
1 task
@davidazad1
Copy link
Author

Hi @cotes2020, I've fixed the issues you pointed out. Please take a look when you have time. Thanks!

@cotes2020
Copy link
Owner

If you don't mind, please upload the modified rendering result image so that we can review it more quickly. Thank you.

@davidazad1
Copy link
Author

ok
image
image

Copy link
Owner

@cotes2020 cotes2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it's an improvement over the first version, the Recent Updated and Trending Tags are still noticeably to the right, as you may have noticed.

Also, you've added a lot of invalid commits to this PR, please remove them, thanks.

@cotes2020 cotes2020 closed this May 21, 2025
palonso pushed a commit to palonso/palonso.github.io that referenced this pull request Jul 28, 2025
…s2020#2243)

I noticed disabling latest_posts in `_config.yml` didn't work because
the variable in the liquid template was seemingly incorrect. This should
fix that.

---------

Co-authored-by: Jake Nabasny <[email protected]>
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.

RTL Support for Chirpy Theme

2 participants