Use correct language codes in multi-language sites (#170)

This commit is contained in:
Jinzhe Zeng 2021-01-04 22:56:41 -05:00 committed by GitHub
parent 278e160f4d
commit 3359ee33f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ config.language }}"> <html lang="{{ page.lang }}">
<head> <head>
{{ partial('_partials/head/head.njk', {}, {cache: theme.cache.enable}) }} {{ partial('_partials/head/head.njk', {}, {cache: theme.cache.enable}) }}
{%- include '_partials/head/head-unique.njk' -%} {%- include '_partials/head/head-unique.njk' -%}

View File

@ -5,7 +5,7 @@
{# Gallery support #} {# Gallery support #}
{{ post_gallery(post.photos) }} {{ post_gallery(post.photos) }}
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ post.lang or config.language }}"> <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ post.lang }}">
<link itemprop="mainEntityOfPage" href="{{ post.permalink }}"> <link itemprop="mainEntityOfPage" href="{{ post.permalink }}">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"> <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">

View File

@ -22,7 +22,7 @@
{##################} {##################}
{### PAGE BLOCK ###} {### PAGE BLOCK ###}
{##################} {##################}
<div class="post-block" lang="{{ page.lang or config.language }}"> <div class="post-block" lang="{{ page.lang }}">
{%- include '_partials/page/page-header.njk' -%} {%- include '_partials/page/page-header.njk' -%}
{#################} {#################}
{### PAGE BODY ###} {### PAGE BODY ###}