Skip to content

Commit 7bc0a55

Browse files
committed
Regular improvement for liquid code
1 parent 40cf15e commit 7bc0a55

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

_includes/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
{%- endif -%}
7676
{% endcapture %}
7777

78-
{% if url != '' %}
78+
{% if url %}
7979
<a href="{{ url }}" aria-label="{{ entry.type }}" {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
8080
<i class="{{ entry.icon }}"></i>
8181
</a>

_layouts/default.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,13 @@
99

1010
<!DOCTYPE html>
1111

12-
{% if site.lang %}
13-
{% assign lang = site.lang | split: "_" | first %}
14-
{% else %}
15-
{% assign lang = 'en' %}
16-
{% endif %}
17-
1812
{% capture prefer_mode %}
19-
{% if site.theme_mode != "dual" %}
13+
{% unless site.theme_mode == "dual" %}
2014
mode="{{ site.theme_mode }}"
21-
{% endif %}
15+
{% endunless %}
2216
{% endcapture %}
2317

24-
<html lang="{{ lang }}" {{ prefer_mode }} >
18+
<html lang="{{ site.lang | split: "_" | first | default: "en" }}" {{ prefer_mode }} >
2519

2620
{% include head.html %}
2721

0 commit comments

Comments
 (0)