Kouhei Sutou
null+****@clear*****
Tue Apr 19 14:50:38 JST 2016
Kouhei Sutou 2016-04-19 14:50:38 +0900 (Tue, 19 Apr 2016) New Revision: 69afb9f7ab1cb05f9a2d6544754291f594fdbe18 https://github.com/groonga/groonga.org/commit/69afb9f7ab1cb05f9a2d6544754291f594fdbe18 Message: Support other language link again Modified files: _config.yml _layouts/en.html _layouts/ja.html _layouts/post.en.html _layouts/post.ja.html blog/index.html blog/index.rdf ja/blog/index.html ja/blog/index.rdf Modified: _config.yml (+52 -0) =================================================================== --- _config.yml 2016-04-19 12:56:53 +0900 (070271c) +++ _config.yml 2016-04-19 14:50:38 +0900 (6207ae1) @@ -8,3 +8,55 @@ kramdown: smart_quotes: ["apos", "apos", "quot", "quot"] coderay_line_numbers: nil gems: [jekyll-paginate] + +defaults: + - scope: + path: "ja/blog" + values: + layout: "ja" + language: ja + country: JP + title: BloGroonga + heading_link: /ja/blog/ + relative_url: blog/ + - scope: + path: "ja" + type: "posts" + values: + layout: "post.ja" + language: ja + country: JP + heading: BloGroonga + heading_link: /ja/blog/ + relative_url: blog/ + - scope: + path: "blog" + values: + layout: "en" + language: en + country: US + title: BloGroonga + heading_link: /blog/ + relative_url: blog/ + - scope: + path: "en" + type: "posts" + values: + layout: "post.en" + language: en + country: US + heading: BloGroonga + heading_link: /blog/ + relative_url: blog/ + - scope: + path: "ja" + values: + layout: "ja" + language: ja + country: JP + - scope: + path: "" + values: + layout: "en" + language: en + country: US Modified: _layouts/en.html (+13 -7) =================================================================== --- _layouts/en.html 2016-04-19 12:56:53 +0900 (461f339) +++ _layouts/en.html 2016-04-19 14:50:38 +0900 (d2f692c) @@ -1,7 +1,5 @@ --- layout: skeleton -language: en -country: US --- <header id="header"> <div class="title"> @@ -32,14 +30,14 @@ country: US <div class="other-language-links"> <ul> - {% capture relative_path %} - {% if page.relative_path %} - /{{ page.relative_path }} + {% capture relative_url %} + {% if page.relative_url %} + /{{ page.relative_url }} {% else %} {{ page.url | remove_first:'en/' | remove:'index.html' }} {% endif %} {% endcapture %} - <li><a href="/ja{{ relative_path | remove:' ' | strip_newlines }}" title="日本語">日本語</a></li> + <li><a href="/ja{{ relative_url | remove:' ' | strip_newlines }}" title="日本語">日本語</a></li> </ul> </div> </header> @@ -55,7 +53,15 @@ country: US {{ page.title }} {% endif %} {% endcapture %} - <h1 id="title">{{ title_heading | strip_newlines }}</h1> + <h1 id="title"> + {% if page.heading_link %} + <a href="{{ page.heading_link }}"> + {{ title_heading | strip_newlines }} + </a> + {% else %} + {{ title_heading | strip_newlines }} + {% endif %} + </h1> <div id="content"> {{ content }} </div> Modified: _layouts/ja.html (+4 -6) =================================================================== --- _layouts/ja.html 2016-04-19 12:56:53 +0900 (d17d6ad) +++ _layouts/ja.html 2016-04-19 14:50:38 +0900 (6be29c7) @@ -1,7 +1,5 @@ --- layout: skeleton -language: ja -country: JP --- <header id="header"> <div class="title"> @@ -33,14 +31,14 @@ country: JP <div class="other-language-links"> <ul> - {% capture relative_path %} - {% if page.relative_path %} - /{{ page.relative_path }} + {% capture relative_url %} + {% if page.relative_url %} + /{{ page.relative_url }} {% else %} {{ page.url | remove_first:'ja/' | remove:'index.html' }} {% endif %} {% endcapture %} - <li><a href="{{ relative_path | remove:' ' | strip_newlines }}" title="English">English</a></li> + <li><a href="{{ relative_url | remove:' ' | strip_newlines }}" title="English">English</a></li> </ul> </div> </header> Modified: _layouts/post.en.html (+0 -2) =================================================================== --- _layouts/post.en.html 2016-04-19 12:56:53 +0900 (8fc222b) +++ _layouts/post.en.html 2016-04-19 14:50:38 +0900 (1ccef21) @@ -1,7 +1,5 @@ --- layout: en -heading: blogroonga -relative_path: blog/ --- <div class="post"> <span class="date"><a href="{{ page.url }}" title="{{ page.title | escape }} ({{ page.date | date: '%Y-%m-%d' }})">{{ page.date | date: "%Y-%m-%d" }}</a></span> Modified: _layouts/post.ja.html (+0 -3) =================================================================== --- _layouts/post.ja.html 2016-04-19 12:56:53 +0900 (f17b9f6) +++ _layouts/post.ja.html 2016-04-19 14:50:38 +0900 (7279f39) @@ -1,8 +1,5 @@ --- layout: ja -heading: blogroonga -heading_link: /ja/blog/ -relative_path: blog/ --- <div class="post"> <span class="date"><a href="{{ page.url }}" title="{{ page.title | escape }} ({{ page.date | date: '%Y-%m-%d' }})">{{ page.date | date: "%Y-%m-%d" }}</a></span> Modified: blog/index.html (+0 -1) =================================================================== --- blog/index.html 2016-04-19 12:56:53 +0900 (92394d1) +++ blog/index.html 2016-04-19 14:50:38 +0900 (c9cc5eb) @@ -1,6 +1,5 @@ --- layout: en -title: blogroonga --- <div id="posts"> {% for post in site.posts limit:10 %} Modified: blog/index.rdf (+1 -2) =================================================================== --- blog/index.rdf 2016-04-19 12:56:53 +0900 (efeafe3) +++ blog/index.rdf 2016-04-19 14:50:38 +0900 (8991349) @@ -1,8 +1,7 @@ --- layout: rss language: en -title: blogroonga -description: A blog about groonga +description: A blog about Groonga creator: Groonga Project blog_base_url: /blog/ --- Modified: ja/blog/index.html (+0 -1) =================================================================== --- ja/blog/index.html 2016-04-19 12:56:53 +0900 (bb04dc4) +++ ja/blog/index.html 2016-04-19 14:50:38 +0900 (4814ab3) @@ -1,6 +1,5 @@ --- layout: ja -title: blogroonga --- <div id="posts"> {% for post in site.posts limit:10 %} Modified: ja/blog/index.rdf (+0 -1) =================================================================== --- ja/blog/index.rdf 2016-04-19 12:56:53 +0900 (fde962e) +++ ja/blog/index.rdf 2016-04-19 14:50:38 +0900 (03265bc) @@ -1,7 +1,6 @@ --- layout: rss language: ja -title: blogroonga description: Groongaに関する情報を発信するブログ creator: Groongaプロジェクト blog_base_url: /ja/blog/ -------------- next part -------------- HTML����������������������������... Descargar