Deleted lang support

This commit is contained in:
tom5079
2019-05-30 20:24:45 +09:00
parent e124d37ea6
commit a092c782b4
3 changed files with 22 additions and 61 deletions

View File

@@ -1,13 +1,26 @@
---
layout: default
lang: en
lang: ko
---
<script>
var userLang = navigator.language || navigator.userLanguage;
if (userLang.search("ko") != -1)
window.location.href = "ko/";
else
window.location.href = "en/";
</script>
<div id="home">
<h1>글 목록</h1>
{% assign posts=site.posts | where:"lang", page.lang %}
<ul class="posts">
{% for post in posts %}
<li>
<span>
{{ post.date | date_to_string }}
</span>
&raquo;
<a href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
</a>
{{ post.excerpt }}
</li>
{% endfor %}
</ul>
</div>