diff --git a/_app/_includes/_amsf.html b/_app/_includes/_amsf.html
index bf40aa4f3..b45e06215 100644
--- a/_app/_includes/_amsf.html
+++ b/_app/_includes/_amsf.html
@@ -92,10 +92,12 @@
Page language tag
{% endcomment %}
{% capture amsf_page_lang %}
- {% if page.languages and page.languages[0] != null %}
- lang="{{ page.languages | first }}"
- {% else %}
- lang="{{ page.languages }}"
+ {% if page.languages %}
+ {% if page.languages[0] != null %}
+ lang="{{ page.languages | first }}"
+ {% else %}
+ lang="{{ page.languages }}"
+ {% endif %}
{% endif %}
{% endcapture %}
diff --git a/_app/_includes/themes/curtana/includes/page-item.html b/_app/_includes/themes/curtana/includes/page-item.html
index 8d33e8bf9..e73291940 100644
--- a/_app/_includes/themes/curtana/includes/page-item.html
+++ b/_app/_includes/themes/curtana/includes/page-item.html
@@ -1,28 +1,40 @@
-
-
-
- {% capture post_link_color %}
- {% if post.scheme-bg %}
- {% if post.scheme-bg-light %}
- style="color: {{ post.scheme-text }};"
- {% else %}
- style="color: {{ post.scheme-bg }};"
- {% endif %}
- {% endif %}
- {% endcapture %}
-
- {% capture post_link_bg %}
- {% if post.scheme-bg %}
- {% if post.scheme-bg-light %}
- style="background: {{ post.scheme-text }};"
- {% else %}
- style="background: {{ post.scheme-bg }};"
- {% endif %}
- {% endif %}
- {% endcapture %}
+
+{% capture amsf_post_lang %}
+ {% if post.languages %}
+ {% if post.languages[0] != null %}
+ lang="{{ post.languages | first }}"
+ {% else %}
+ lang="{{ post.languages }}"
+ {% endif %}
+ {% endif %}
+{% endcapture %}
+
+
+{% capture post_link_color %}
+ {% if post.scheme-bg %}
+ {% if post.scheme-bg-light %}
+ style="color: {{ post.scheme-text }};"
+ {% else %}
+ style="color: {{ post.scheme-bg }};"
+ {% endif %}
+ {% endif %}
+{% endcapture %}
+
+{% capture post_link_bg %}
+ {% if post.scheme-bg %}
+ {% if post.scheme-bg-light %}
+ style="background: {{ post.scheme-text }};"
+ {% else %}
+ style="background: {{ post.scheme-bg }};"
+ {% endif %}
+ {% endif %}
+{% endcapture %}
+
+