Skip to content

Commit 09f5a32

Browse files
committed
actually removed language suffixes in post titles
1 parent ee55c70 commit 09f5a32

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Diff for: _layouts/post.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
layout: main
33
---
4-
5-
{% assign language_suffix = "." | append : page.lang %}
6-
{% assign title_without_language_code = page.title | replace : language_suffix : '' %}
7-
<h3>{{ title_without_language_code }}</h3>
4+
{% assign lang_suf = "." | append : page.lang %}
5+
<h3>{{page.title | split : lang_suf | first}}</h3>
86

97
{{ content }}

Diff for: index.en.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
permalink: /en/
66
---
77
{% for post in site.posts %}
8-
{% if post.lang == page.lang %}
9-
<h3><a href="{{ post.url }}"> {{ post.title }} </a></h3>
8+
{% if post.lang == page.lang %}
9+
{% assign lang_suf = "." | append : post.lang %}
10+
<h3><a href="{{ post.url }}"> {{post.title | split : lang_suf | first}} </a></h3>
1011
{{ post.excerpt }}
1112
<a href="{{ post.url }}" class="center">[read on…]</a>
1213
{% endif %}

Diff for: index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
---
66
{% for post in site.posts %}
77
{% if post.lang == page.lang %}
8-
<h3><a href="{{ post.url }}"> {{ post.title }} </a></h3>
8+
{{post.lang}}
9+
{% assign lang_suf = "." | append : post.lang %}
10+
<h3><a href="{{ post.url }}"> {{post.title | split : lang_suf | first}} </a></h3>
911
{{ post.excerpt }}
1012
<a href="{{ post.url }}" class="center">[weiter…]</a>
1113
{% endif %}

0 commit comments

Comments
 (0)