1
0
mirror of https://github.com/ipdb/website.git synced 2024-11-13 16:54:50 +01:00

prepare functionality for alternate language pages

This commit is contained in:
Matthias Kretschmann 2017-09-07 13:52:43 +02:00
parent 9143ad4f0e
commit b623e67486
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 28 additions and 2 deletions

View File

@ -48,6 +48,10 @@
<!-- Canonical URL -->
<link rel="canonical" href="{{ site.url }}{{ page.url | replace:'index.html','' }}">
{% for alt in page.alternate %}
<link rel="alternate" href="{{ site.url }}{{ alt.link }}" hreflang="{{ alt.language }}" />
{% endfor %}
<!-- Apple -->
<meta name="apple-mobile-web-app-title" content="{{ site.title }}">

View File

@ -17,7 +17,7 @@
{% assign active = 'active' %}
{% endif %}
{% unless page.path contains 'foundation/index' %}
{% unless page.path contains 'foundation/index' or page.language == 'de' %}
<a class="menu__link {{ active }}" href="{{ page.url }}">{{ page.title }}</a>
{% endunless %}
{% endif %}

View File

@ -1,5 +1,11 @@
<!doctype html>
<html lang="en">
<html
{% if page.language %}
lang="{{ page.language }}"
{% else %}
lang="en"
{% endif %}
>
{% include head.html %}

View File

@ -3,4 +3,9 @@ layout: page
title: Articles
subtitle: Articles of Association of the IPDB Foundation
language: en
alternate:
- language: de
link: /foundation/satzung/
---

View File

@ -0,0 +1,11 @@
---
layout: page
title: Satzung
subtitle: Satzung des Interplanetary Origins e.V.
language: de
alternate:
- language: en
link: /foundation/articles/
---