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

feat(direction): add direction option #2243

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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!

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