You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: improve formatting of RTL content creation instructions in documentation
fix: swap float directions for images in Persian RTL content
fix: remove duplicated font source and unicode-range for RTL fonts
fix: update font weights for RTL language stylesheets
fix: add spaces to read time unit and prompt for better formatting
fix: reorder RTL font loader inclusion for rendering after googlefonts
fix: update RTL language configuration to use 'fa' instead of 'fa-IR' for better compatibility
fix: add transform to sidebar for better responsiveness in RTL layout
fix: add RTL Support feature to README
fix: update RTL support comments for clarity
fix: enhance RTL support documentation for clarity and usability
fix: correct meta format in fa.yml for clarity
Signed-off-by: Zakaria Fatahi <zakaria@buzzjective.com>
fix: improve sidebar transform handling for RTL layout in mobile
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد.
180
+
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد.
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد.
186
+
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد.
Copy file name to clipboardExpand all lines: docs/RTL-SUPPORT.md
+48-25Lines changed: 48 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,24 +21,32 @@ The Chirpy theme provides support for Right-to-Left (RTL) languages such as Arab
21
21
RTL support can be configured in your `_config.yml` file:
22
22
23
23
```yaml
24
-
# RTL Support Configuration
25
-
# Set this to true to enable RTL support for all languages
26
-
# If false, RTL will only be applied to RTL languages (ar, he, fa, etc.)
24
+
# Force RTL mode for the entire website
25
+
# When set to true, all pages will be rendered right-to-left, regardless of language
26
+
# Useful if your entire site is in an RTL language
27
+
# If enabled, also set one of the RTL languages in rtl_languages list as your site.lang value
27
28
rtl_support: false
28
29
29
-
# RTL Languages array - add more languages if needed
30
+
# RTL Languages array
31
+
# If you want to have your entire website in an RTL language, and you set rtl_support: true,
32
+
# then set one of these languages for lang: in the _config.yml and your entire website locale will change too.
33
+
# But if rtl_support is false and you just want specific pages in RTL with RTL locale,
34
+
# add 'lang: fa' (or another code from this list) to the front matter of those specific pages.
35
+
# The page will then be displayed in RTL mode with the appropriate font and locale
30
36
rtl_languages:
31
37
- ar
32
-
- fa-IR
33
-
- he
38
+
- fa
34
39
- ku-IQ
35
40
- ur-PK
36
41
- ps-AF
37
42
- dv-MV
38
43
```
39
44
40
-
- `rtl_support`: If set to `true`, all pages will be rendered in RTL mode regardless of language. If `false` (default), only pages with languages listed in `rtl_languages` will be in RTL mode.
41
-
- `rtl_languages`: An array of language codes that should be rendered in RTL mode. Add your RTL language code to this list if needed.
45
+
- `rtl_support`: When set to `true`, forces RTL mode for the entire website, regardless of language. If enabled, you should also set one of the RTL languages as your main site language (e.g., `lang: fa` in `_config.yml`) to apply the appropriate locale.
46
+
47
+
- `rtl_languages`: A list of language codes that trigger RTL mode. These can be used in two ways:
48
+
1. If `rtl_support: true`, set one of these as your site's main language in `_config.yml`
49
+
2. If `rtl_support: false`, add `lang: fa` (or another code from this list) to the front matter of specific pages you want displayed in RTL mode
42
50
43
51
## How It Works
44
52
@@ -52,27 +60,42 @@ The RTL support works by:
52
60
53
61
## Creating RTL Content
54
62
55
-
To create content in an RTL language:
63
+
You have two options for creating RTL content:
56
64
57
-
1. Add the appropriate `lang` attribute in the front matter of your post or page:
65
+
### 1. Individual RTL Pages
58
66
59
-
```yaml
60
-
---
61
-
title: عنوان المقال
62
-
author: اسم الكاتب
63
-
date: 2023-01-01
64
-
lang: ar
65
-
# other front matter...
66
-
---
67
-
68
-
محتوى المقال هنا...
69
-
```
67
+
To make a specific page or post display in RTL mode:
68
+
69
+
- Add the appropriate `lang` attribute in the front matter, using one of the languages defined in `rtl_languages`:
70
+
71
+
```yaml
72
+
---
73
+
title: عنوان المقال
74
+
author: اسم الكاتب
75
+
date: 2023-01-01
76
+
lang: ar
77
+
# other front matter...
78
+
---
79
+
80
+
محتوى المقال هنا...
81
+
```
82
+
83
+
- The theme will automatically:
84
+
- Display only this specific page in RTL mode
85
+
- Use the appropriate font for the language
86
+
- Apply the corresponding locale file if available (e.g., `_data/locales/ar.yml`)
87
+
- The rest of your site will remain in LTR mode
88
+
89
+
This approach is ideal for multilingual sites where only some content is in RTL languages.
90
+
91
+
### 2. Entire Site in RTL
70
92
71
-
2. The theme will automatically detect the language and apply RTL styling and appropriate fonts.
93
+
If your entire site is in an RTL language:
72
94
73
-
3. When using RTL languages, the whole page will be displayed in RTL mode, including navigation, sidebar, and other UI elements.
95
+
1. Set `rtl_support: true` in your `_config.yml`
96
+
2. All pages will be displayed in RTL mode regardless of their language setting
74
97
75
-
4. If you've provided a localization file for the language (e.g., `_data/locales/ar.yml`), the theme will use it for UI text.
98
+
This approach is simpler if you don't need to mix RTL and LTR content.
76
99
77
100
## Language-Specific Fonts
78
101
@@ -83,7 +106,7 @@ The theme includes built-in support for several RTL language fonts:
83
106
- **Hebrew**: Noto Sans Hebrew
84
107
- **Urdu**: Noto Nastaliq Urdu
85
108
86
-
These fonts are automatically applied based on the page's language attribute. For example, if your page has `lang: fa-IR`, the Vazirmatn font will be used.
109
+
These fonts are automatically applied based on the page's language attribute. For example, if your page has `lang: fa`, the Vazirmatn font will be used.
0 commit comments