diff options
author | lubang <purebuddy@gmail.com> | 2019-06-09 08:29:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-09 08:29:27 +0300 |
commit | 0a346f10252f8fb38566944950f70db5867ab735 (patch) | |
tree | c773daddb85b9f50d55661358a92ab7dfdca3cc8 | |
parent | a883ba2958eb2741d020ed457b6ac59a974e8dc0 (diff) | |
parent | 28a248c8be16372566977fad866dcd3bc2faacd5 (diff) |
release v2.1.0
-rwxr-xr-x | README.md | 9 | ||||
-rw-r--r-- | exampleSite/content/post/post_sample.md | 20 | ||||
-rw-r--r-- | exampleSite/content/project/project_sample.md | 20 | ||||
-rw-r--r-- | i18n/en.toml | 92 | ||||
-rw-r--r-- | i18n/kr.toml | 92 | ||||
-rw-r--r-- | layouts/404.html | 11 | ||||
-rw-r--r-- | layouts/_default/summary.html | 4 | ||||
-rw-r--r-- | layouts/categories/terms.html | 4 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rwxr-xr-x | layouts/partials/header.html | 21 | ||||
-rw-r--r-- | layouts/partials/pagination.html | 6 | ||||
-rwxr-xr-x | layouts/partials/post.html | 35 | ||||
-rw-r--r-- | layouts/tags/terms.html | 2 | ||||
-rw-r--r-- | static/css/styles.css | 4 | ||||
-rw-r--r-- | theme.toml | 2 |
15 files changed, 248 insertions, 76 deletions
@@ -24,6 +24,7 @@ Modify your configuration: title = "your-site-name" languageCode = "ko-KR" + DefaultContentLanguage = "kr" theme = "hugo-hello-programmer-theme" disqusShortname = "XXXX" googleAnalytics = "UA-XXXXXXXX-X" @@ -41,6 +42,14 @@ Modify images for your site: static/images/logo@.png (Left top logo image) static/images/thumbnail.png (OpenGraph tag for preview) +## Multilingual + +Configure your language. Now support these languages. (updated 2019-06-09) + +* kr (Korean, 한국어) +* en (English, a little bit stupid sentence :( Plz. Pull-request for this theme) + +> You can pull request other languages or fix native sentence from exist language pack. ## References diff --git a/exampleSite/content/post/post_sample.md b/exampleSite/content/post/post_sample.md index 4544356..712e1af 100644 --- a/exampleSite/content/post/post_sample.md +++ b/exampleSite/content/post/post_sample.md @@ -1,16 +1,10 @@ +++ -date = "2016-10-19T23:35:00+09:00" -title = "Post title" -description = "Post Description" -categories = [ - "programming", - "golang", -] -tags = [ - "hugo", - "theme" -] - -+++ +--- +title: "Post title" +date: 2016-10-19T23:35:00+09:00 +categories: ["programming"] +tags: ["project", "tag", "theme", "hugo", "lubang"] +cover: "https://blog.lulab.net/images/projects/2019-05-hugo-hello-programmer-theme-v2_projects.png" +--- Write your post.
\ No newline at end of file diff --git a/exampleSite/content/project/project_sample.md b/exampleSite/content/project/project_sample.md index 2803321..467540a 100644 --- a/exampleSite/content/project/project_sample.md +++ b/exampleSite/content/project/project_sample.md @@ -1,15 +1,9 @@ -+++ -date = "2016-10-19T22:35:00+09:00" -title = "Project Name" -description = "Project Description" -categories = [ - "project", -] -tags = [ - "project", - "tag" -] - -+++ +--- +title: "Project Name" +date: 2016-10-19T22:35:00+09:00 +categories: ["projects"] +tags: ["project", "tag", "theme", "hugo", "lubang"] +cover: "https://blog.lulab.net/images/projects/2019-05-hugo-hello-programmer-theme-v2_cover-image.png" +--- Write your content.
\ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..8052ae1 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,92 @@ +################### +# Menu +################### +[menuCategories] +other = "Categories" + +[menuTags] +other = "Tags" + +[menuProjects] +other = "Projects" + +[menuBurgerTitle] +other = "Menu" + +[menuSearchKeyword] +other = "Keyword" + +[menuOgDescPostfix] +other = "read this article." + +################### +# Footer +################### +[footerToTheTop] +other = "Top" + +################### +# Pagination +################### +[paginationPage] +other = "Page" + +[paginationPrev] +other = "Prev" + +[paginationNext] +other = "Next" + +################### +# Post +################### +[postAuthorPrefix] +other = "Friendly" + +[postAuthorPostfix] +other = "wrotes this article at" + +[postDatetime] +other = "{{ .Format \"Monday, Jan 2, 2006 15:04\" }}" + +[postDatetimePostfix] +other = "for you." + +[postToc] +other = "TOC" + +[postRecommendArticles] +other = "Recommend these articles" + +[postReadMore] +other = "More" + +################### +# Category +################### +[categoriesDescription] +other = "Read an article by categories. You can read the recent article when you click the title." + +[categoriesCount] +other = " EA" + +################### +# Tag +################### +[tagsDescription] +other = "Read an article by tags." + +################### +# Not found 404 +################### +[notFoundTitle] +other = "NOT FOUND__404" + +[notFoundSubTitle] +other = "While you're here, check the site again." + +[notFoundDescription] +other = "The link may have changed, please check the tag!! There may be something you want there :)" + +[notFoundGoToHome] +other = "Go to the main"
\ No newline at end of file diff --git a/i18n/kr.toml b/i18n/kr.toml new file mode 100644 index 0000000..ab98722 --- /dev/null +++ b/i18n/kr.toml @@ -0,0 +1,92 @@ +################### +# Menu +################### +[menuCategories] +other = "카테고리" + +[menuTags] +other = "태그" + +[menuProjects] +other = "프로젝트" + +[menuBurgerTitle] +other = "메뉴" + +[menuSearchKeyword] +other = "검색어" + +[menuOgDescPostfix] +other = "을 한 번 살펴보세요." + +################### +# Footer +################### +[footerToTheTop] +other = "위로" + +################### +# Pagination +################### +[paginationPage] +other = "페이지" + +[paginationPrev] +other = "이전" + +[paginationNext] +other = "다음" + +################### +# Post +################### +[postAuthorPrefix] +other = "친절한" + +[postAuthorPostfix] +other = "님이" + +[postDatetime] +other = "{{ .Format \"2006년 01월 02일 15시 04분\" }}" + +[postDatetimePostfix] +other = "에 작성한 글입니다." + +[postToc] +other = "차례" + +[postRecommendArticles] +other = "다음으로 읽을만한 글입니다." + +[postReadMore] +other = "더보기" + +################### +# Category +################### +[categoriesDescription] +other = "카테고리 별 글을 볼 수 있습니다. 최근 글은 제목을 클릭하여 바로 읽을 수 있습니다." + +[categoriesCount] +other = "개" + +################### +# Tag +################### +[tagsDescription] +other = "태그 별 글을 볼 수 있습니다." + +################### +# Not found 404 +################### +[notFoundTitle] +other = "잘못된 공간입니다__404" + +[notFoundSubTitle] +other = "이왕 오신 김에 사이트를 다시 한 번 확인해보세요." + +[notFoundDescription] +other = "링크가 변경되었을 수 있습니다. 태그를 한 번 확인해보세요!! 그 곳에 원하던 내용이 있을 수 있습니다 :)" + +[notFoundGoToHome] +other = "첫 화면으로"
\ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index fc33ad0..62d8f53 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,10 +1,13 @@ {{ partial "header.html" . }} <div class="post"> - <h1 style="font-size: 5em; color: #eeeeee; line-height: 1em;">잘못된 공간입니다__404</h1> - <h2>이왕 오신 김에 <a href="{{ "/" | relURL }}">"{{ .Site.Title }}"</a> 를 한 번 확인해보세요.</h2> - <p>그 곳에 원하던 내용이 있을 수 있습니다.</p> + <h1 style="font-size: 5em; color: #eeeeee; line-height: 1em;">{{ i18n "notFoundTitle" }}</h1> + <h2> + {{ i18n "notFoundSubTitle" }} + <a href="{{ "/" | relURL }}">"{{ .Site.Title }}"</a> + </h2> + <p>{{ i18n "notFoundDescription" }}</p> <div style="text-align: center;"> - <h1><a href="{{ "/" | relURL }}">첫 화면으로</a></h1> + <h1><a href="{{ "/" | relURL }}">{{ i18n "notFoundGoToHome" }}</a></h1> </div> </div> {{ partial "footer.html" . }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 9251e0e..58e04a5 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -3,7 +3,7 @@ <a href="{{ .Permalink }}" title="{{ .Title }}"> <img src="{{ "/images/post-title-icon.png" | relURL }}" /> <div class="post-meta"> - <time>{{ .Date.Format "2006년 01월 02일 15시 04분" }}</time> + <time>{{ i18n "postDatetime" .Date }}</time> <h1>{{ .Title }}</h1> </div> </a> @@ -18,7 +18,7 @@ <div> {{ .Summary }} {{ if .Truncated }} - <a href="{{ .RelPermalink }}" class="summary-more">더보기</a> + <a href="{{ .RelPermalink }}" class="summary-more">{{ i18n "postReadMore" }}</a> {{ end }} </div> </div> diff --git a/layouts/categories/terms.html b/layouts/categories/terms.html index 8c6f046..4f54de0 100644 --- a/layouts/categories/terms.html +++ b/layouts/categories/terms.html @@ -2,7 +2,7 @@ <div class="categories"> <h1>CATEGORIES</h1> - <p>카테고리 별 글을 볼 수 있습니다. 최근 글은 제목을 클릭하여 바로 읽을 수 있습니다.</p> + <p>{{ i18n "categoriesDescription" }}</p> <ul> {{ $baseurl := .Site.BaseURL }} {{ $data := .Data }} @@ -11,7 +11,7 @@ <span class="title"> <a href="{{ $baseurl }}{{ $data.Plural }}/{{ $value.Name | urlize }}"> <i class="fa fa-angle-right icon" aria-hidden="true"></i> - {{ upper $value.Name }} ({{ $value.Count }}개) + {{ upper $value.Name }} ({{ $value.Count }}{{ i18n "categoriesCount" }}) </a> </span> <span class="links"> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 7d63bb0..faff4ea 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ <div class="go-top"> <a href="#" class="go-top-button"> <i class="fa fa-angle-double-up"></i> - <span>위로</span> + <span>{{ i18n "footerToTheTop" }}</span> </a> </div> <footer class="footer"> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 85f2433..286b7be 100755 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -4,7 +4,7 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{{ .Title }} {{ if ne .Title .Site.Title }} | {{ .Site.Title }}{{ end }}</title> - <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ $.Site.Params.description}} '{{ .Title }}'을 한 번 살펴보세요.{{ end }}"> + <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ $.Site.Params.description}} '{{ .Title }}'{{ i18n "menuOgDescPostfix" }}{{ end }}"> <meta property="og:title" content="{{ .Title }}"> {{ if .IsPage }} <meta property="og:type" content="article"> @@ -12,7 +12,7 @@ {{ else }} <meta property="og:type" content="website"> {{ end }} - <meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ $.Site.Params.description}} '{{ .Title }}'을 한 번 살펴보세요.{{ end }}"> + <meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ $.Site.Params.description}} '{{ .Title }}'{{ i18n "menuOgDescPostfix" }}{{ end }}"> <meta property="og:url" content="{{ .Permalink }}"> <meta property="og:site_name" content="{{ .Site.Title }}"> {{ if .Params.cover }} @@ -54,13 +54,6 @@ e.className = 'menu'; } </script> - <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> - <script> - (adsbygoogle = window.adsbygoogle || []).push({ - google_ad_client: "ca-pub-5115425690914720", - enable_page_level_ads: true - }); - </script> </head> <body> <div class="navbar"> @@ -71,17 +64,17 @@ </div> <div class="burger"> <button onclick="toggle_visibility('menu')"> - <i class="fa fa-bars" aria-hidden="true"></i> 메뉴 + <i class="fa fa-bars" aria-hidden="true"></i> {{ i18n "menuBurgerTitle" }} </button> </div> <div id="menu" class="menu hidden"> <ul> <li><a href="{{ "/" | relURL }}">#{{ .Site.Title }}</a></li> - <li><a href="{{ "/categories" | relURL }}">#카테고리</a></li> - <li><a href="{{ "/tags" | relURL }}">#태그</a></li> - <li><a href="{{ "/projects" | relURL }}">#프로젝트</a></li> + <li><a href="{{ "/categories" | relURL }}">#{{ i18n "menuCategories" }}</a></li> + <li><a href="{{ "/tags" | relURL }}">#{{ i18n "menuTags" }}</a></li> + <li><a href="{{ "/projects" | relURL }}">#{{ i18n "menuProjects" }}</a></li> </ul> - <input class="search" id="search-input" type="search" placeholder="검색어" value=""> + <input class="search" id="search-input" type="search" placeholder="{{ i18n "menuSearchKeyword" }}" value=""> </div> </div> <div class="container">
\ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index d78fa7e..761a3b6 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -1,17 +1,17 @@ <div class="paging"> {{ if .Paginator.HasPrev }} <a href="{{ .Paginator.Prev.URL }}" rel="prev"> - 이전 + {{ i18n "paginationPrev" }} <i class="fa fa-caret-left" aria-hidden="true"></i> </a> {{ end }} <span class="page"> - 페이지 {{ .Paginator.PageNumber }} / {{ .Paginator.TotalPages }} + {{ i18n "paginationPage" }} {{ .Paginator.PageNumber }} / {{ .Paginator.TotalPages }} </span> {{ if .Paginator.HasNext }} <a href="{{ .Paginator.Next.URL }}" rel="next"> <i class="fa fa-caret-right" aria-hidden="true"></i> - 다음 + {{ i18n "paginationNext "}} </a> {{ end }} </div> diff --git a/layouts/partials/post.html b/layouts/partials/post.html index f6438ab..1cfe18f 100755 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -3,13 +3,13 @@ <a href="{{ .Permalink }}"> <img src="{{ "/images/post-title-icon.png" | relURL }}" /> <div class="post-meta"> - <time>{{ .Date.Format "2006년 01월 02일 15시 04분" }}</time> + <time>{{ i18n "postDatetime" .Date }}</time> <h1>{{ .Title }}</h1> </div> </a> </div> <div class="post-toc"> - <span class="title">차례</span> + <span class="title">{{ i18n "postToc" }}</span> {{ .TableOfContents }} </div> <section class="post-content"> @@ -17,40 +17,42 @@ </section> <div class="share"> <a - href="http://www.facebook.com/sharer.php?src=bm&u={{ .Permalink }}&t={{ .Title }}" + href="//www.facebook.com/sharer.php?src=bm&u={{ .Permalink }}&t={{ .Title }}" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;" ><i class="fa fa-facebook"></i ></a> <a - href="http://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&tw_p=tweetbutton" + href="//twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&tw_p=tweetbutton" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;" ><i class="fa fa-twitter"></i ></a> <a - href="http://getpocket.com/edit?url={{ .Permalink }}&title={{ .Title }}" + href="//getpocket.com/edit?url={{ .Permalink }}&title={{ .Title }}" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;" ><i class="fa fa-get-pocket"></i ></a> <a - href="https://plus.google.com/share?url={{ .Permalink }}" + href="//plus.google.com/share?url={{ .Permalink }}" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;" ><i class="fa fa-google-plus"></i ></a> </div> <div class="post-meta-code"> <div class="desc"> - 친절한 + {{ i18n "postAuthorPrefix" }} {{ with.Params.author }} {{ . }} {{ else }} <a href="mailto:{{ .Site.Author.email }}">{{ .Site.Author.name }}</a> {{ end }} - 님이 <span class="highlight">{{ .Date.Format "2006년 01월 02일 15시 04분" }}</span> 에 작성한 글입니다. + {{ i18n "postAuthorPostfix" }} + <span class="highlight">{{ i18n "postDatetime" .Date }}</span> + {{ i18n "postDatetimePostfix" }} </div> <div class="desc"> {{ if isset .Params "categories" }} <div class="desc"> - _구분 + <span class="fixed-desc">_{{ i18n "menuCategories" }}</span> {{ $baseUrl := .Site.BaseURL }} {{ range.Params.categories }} <a href="{{ $baseUrl }}/categories/{{ . | urlize }}">#{{ . }}</a> @@ -58,7 +60,7 @@ </div> {{ end }} <div class="desc"> - _태그 + <span class="fixed-desc">_{{ i18n "menuTags" }}</span> {{ with.Params.tags }} {{ range . }} <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">#{{ . }}</a> @@ -73,7 +75,7 @@ </div> {{ end }} <div class="recommend-articles"> - 다음으로 읽을만한 글입니다. + {{ i18n "postRecommendArticles"}} <ul> {{ if .Prev }} <li> @@ -91,15 +93,4 @@ {{ end }} </ul> </div> - <div class="ads"> - <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> - <!-- 룰루랄라코딩 하단광고 --> - <ins class="adsbygoogle" - style="display:inline-block;width:100%;height:90px" - data-ad-client="ca-pub-5115425690914720" - data-ad-slot="5156216152"></ins> - <script> - (adsbygoogle = window.adsbygoogle || []).push({}); - </script> - </div> </div>
\ No newline at end of file diff --git a/layouts/tags/terms.html b/layouts/tags/terms.html index 029e849..26c9a75 100644 --- a/layouts/tags/terms.html +++ b/layouts/tags/terms.html @@ -2,7 +2,7 @@ <div class="tags"> <h1>TAGS</h1> - <p>태그 별 글을 볼 수 있습니다.</p> + <p>{{ i18n "tagsDescription" }}</p> <div class="tag-list"> {{ $baseurl := .Site.BaseURL }} {{ $data := .Data }} diff --git a/static/css/styles.css b/static/css/styles.css index e1a5f4e..e73aecb 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -309,6 +309,10 @@ img { .post .post-meta-code .desc { padding-left: 10px; } +.post .post-meta-code .desc .fixed-desc { + display: inline-block; + min-width: 90px; +} .post .post-meta-code .highlight { color: black; } @@ -10,5 +10,5 @@ features = ["blog", "simple", "programmer"] min_version = 0.15 [author] - name = "DONGGEUN, BANG" + name = "LUBANG (DONGGEUN, BANG)" homepage = "https://blog.lulab.net" |