Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page locale #4862

Merged
merged 4 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% endif %}

<div class="{{ include.type | default: 'list' }}__item">
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ post.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>
suhlig marked this conversation as resolved.
Show resolved Hide resolved
{% if include.type == "grid" and teaser %}
<div class="archive__item-teaser">
<img src="{{ teaser | relative_url }}" alt="">
Expand Down
2 changes: 1 addition & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
{% endif %}
{% if forloop.last %}
<li class="current">{{ page.title }}</li>
<li class="current"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>{{ page.title }}</li>
{% else %}
{% assign i = i | plus: 1 %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
Expand Down
2 changes: 1 addition & 1 deletion _layouts/archive-taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div class="archive">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>{{ page.title }}</h1>
{% endunless %}
{% for post in page.posts %}
{% include archive-single.html %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="archive">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>{{ page.title }}</h1>
{% endunless %}
{{ content }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!doctype html>
{% include copyright.html %}
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js">
<html lang="{{ site.locale | replace: "_", "-" | default: "en" }}" class="no-js">
<head>
{% include head.html %}
{% include head/custom.html %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div class="archive">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>{{ page.title }}</h1>
{% endunless %}

{{ content }}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div id="main" role="main">
{% include sidebar.html %}

<article class="page" itemscope itemtype="https://schema.org/CreativeWork">
<article class="page" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>
{% if page.title %}<meta itemprop="headline" content="{{ page.title | replace: '|', '&#124;' | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endif %}

<div id="main" role="main">
<article class="splash" itemscope itemtype="https://schema.org/CreativeWork">
<article class="splash" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale | default: site.locale | replace: "_", "-" | default: "en" }}"{% endif %}>
{% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
Expand Down