Skip to content
Open
4 changes: 4 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
{% endunless %}

{% if dir and dir contains 'rtl' %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css" integrity="sha384-MdqCcafa5BLgxBDJ3d/4D292geNL64JyRtSGjEszRUQX9rhL1QkcnId+OT7Yw+D+" crossorigin="anonymous">
{% endif %}

<!-- Theme style -->
<link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">

Expand Down
2 changes: 1 addition & 1 deletion _includes/trending-tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% endfor %}

{% if trending_tags.size > 0 %}
<section>
<section id="trending-tags">
<h2 class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</h2>
<div class="d-flex flex-wrap mt-3 mb-1 me-3">
{% for tag_name in trending_tags %}
Expand Down
12 changes: 10 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
{% endif %}

<!-- `site.alt_lang` can specify a language different from the UI -->
<html lang="{{ page.lang | default: site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
{% assign _lang_code = lang | split: '-' | first %}

{%- capture dir -%}
{%- if 'ar,fa,he,iw,ps,ug,ur,yi,ku' contains _lang_code -%}
dir="rtl"
{%- endif -%}
{%- endcapture -%}

<!-- `lang` attribute is set in _includes/lang.html -->
<html lang="{{ lang }}" {{ dir }} {{ prefer_mode }}>
{% include head.html %}

<body>
Expand Down
1 change: 1 addition & 0 deletions _sass/base/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
@forward 'base';
@forward 'typography';
@forward 'syntax';
@forward 'rtl';
Loading