diff --git a/.gitignore b/.gitignore
index ba359f8..f1360a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ Gemfile.lock
_site
_gh_pages
+.jekyll-metadata
diff --git a/_config.yml b/_config.yml
index 0862eaf..e671fc8 100644
--- a/_config.yml
+++ b/_config.yml
@@ -15,7 +15,32 @@ kramdown:
input: GFM
hard_wrap: false
toc_levels: "2,3"
+ auto_ids: true
+ transliterated_header_ids: true
+ auto_id_stripping: true
-gems:
+plugins:
- jekyll-redirect-from
- jekyll-sitemap
+
+langs:
+ de:
+ de: Deutsch
+ en: German
+ en:
+ en: English
+ ja:
+ ja: 日本語
+ en: Japanese
+ pt-BR:
+ pt-BR: Português (BR)
+ en: Portuguese - Brazil
+ ru:
+ ru: Русский
+ en: Russian
+ zh:
+ zh: 简体中文
+ en: Simplified Chinese
+ zh-TW:
+ zh-TW: 正體中文
+ en: Traditional Chinese
diff --git a/_includes/head.html b/_includes/head.html
deleted file mode 100644
index dafbb33..0000000
--- a/_includes/head.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
- ↑
-
-
-
diff --git a/_includes/foot.html b/_includes/layout_partials/foot.html
similarity index 67%
rename from _includes/foot.html
rename to _includes/layout_partials/foot.html
index e6cca9d..78f4a6c 100644
--- a/_includes/foot.html
+++ b/_includes/layout_partials/foot.html
@@ -2,33 +2,7 @@
Translations:
-
- Deutsch
-
- ·
-
- English
-
- ·
-
- 日本語
-
- ·
-
- Português (BR)
-
- ·
-
- Русский
-
- ·
-
- 简体中文
-
- ·
-
- 正體中文
-
+ {% include layout_partials/languages.html %}
This guide is being discussed on Hacker News [
diff --git a/_includes/layout_partials/head.html b/_includes/layout_partials/head.html
new file mode 100644
index 0000000..6ec9c29
--- /dev/null
+++ b/_includes/layout_partials/head.html
@@ -0,0 +1,35 @@
+
+ ↑
+
+
+
+
+ {% include layout_partials/languages.html dropdown=true %}
+
+
{% include static/language.svg %}
+
+
+
diff --git a/_includes/layout_partials/language_dropdown_option.html b/_includes/layout_partials/language_dropdown_option.html
new file mode 100644
index 0000000..027ecc3
--- /dev/null
+++ b/_includes/layout_partials/language_dropdown_option.html
@@ -0,0 +1,4 @@
+
+ {{ full }}
+
\ No newline at end of file
diff --git a/_includes/layout_partials/language_nav_links.html b/_includes/layout_partials/language_nav_links.html
new file mode 100644
index 0000000..9cf9c00
--- /dev/null
+++ b/_includes/layout_partials/language_nav_links.html
@@ -0,0 +1,7 @@
+
+ {{ local }}
+
+{%- if forloop.last != true %} · {% endif -%}
\ No newline at end of file
diff --git a/_includes/layout_partials/language_rel_alternate.html b/_includes/layout_partials/language_rel_alternate.html
new file mode 100644
index 0000000..7fcd5f0
--- /dev/null
+++ b/_includes/layout_partials/language_rel_alternate.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/_includes/layout_partials/languages.html b/_includes/layout_partials/languages.html
new file mode 100644
index 0000000..3d35927
--- /dev/null
+++ b/_includes/layout_partials/languages.html
@@ -0,0 +1,21 @@
+{%- assign lpages=site.pages | where_exp:"page", "page contains 'lang'" | sort: 'lang' -%}
+
+{%- assign content_template="layout_partials/language_nav_links.html" -%}
+{%- if include.dropdown == true -%}
+ {%- assign content_template="layout_partials/language_dropdown_option.html" -%}
+{%- endif -%}
+{%- if include.rel_alternate == true -%}
+ {%- assign content_template="layout_partials/language_rel_alternate.html" -%}
+{%- endif -%}
+
+{% for l in lpages %}
+ {%- assign local=site.langs[l.lang][l.lang] -%}
+ {%- assign english=site.langs[l.lang]['en'] -%}
+ {%- assign iso=l.lang -%}
+ {%- assign url=l.url | absolute_url -%}
+ {%- capture full -%}
+ {{ local }}{% if l.lang_title %} ({{ english }}){% endif %}
+ {%- endcapture -%}
+
+ {% include {{ content_template }} %}
+{% endfor %}
\ No newline at end of file
diff --git a/_includes/anchor.min.js b/_includes/static/anchor.min.js
similarity index 100%
rename from _includes/anchor.min.js
rename to _includes/static/anchor.min.js
diff --git a/_includes/highlight.hybrid.css b/_includes/static/highlight.hybrid.css
similarity index 100%
rename from _includes/highlight.hybrid.css
rename to _includes/static/highlight.hybrid.css
diff --git a/_includes/highlight.pack.js b/_includes/static/highlight.pack.js
similarity index 100%
rename from _includes/highlight.pack.js
rename to _includes/static/highlight.pack.js
diff --git a/_includes/static/language.svg b/_includes/static/language.svg
new file mode 100644
index 0000000..22c7b16
--- /dev/null
+++ b/_includes/static/language.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/_layouts/default.html b/_layouts/default.html
index b26b7dc..ea1a103 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -6,10 +6,10 @@
{% if page.lang_title %}{{ page.lang_title }} · {% endif %}{{ site.name }}
-
+
-
-
+
+
@@ -31,31 +31,24 @@
-
-
-
-
-
-
-
+ {% include layout_partials/languages.html rel_alternate=true %}
-
+
- {% include head.html %}
+ {% include layout_partials/head.html %}
{{ content }}
- {% include foot.html %}
+ {% include layout_partials/foot.html %}
-
-
+