[Groonga-commit] droonga/droonga.org at 724f5fc [gh-pages] Use page.path to derive source_path

Back to archive index

Yoji Shidara null+****@clear*****
Thu Feb 13 19:00:37 JST 2014


Yoji Shidara	2014-02-13 19:00:37 +0900 (Thu, 13 Feb 2014)

  New Revision: 724f5fccf17503f09dd7f6392637088c4b6a6a16
  https://github.com/droonga/droonga.org/commit/724f5fccf17503f09dd7f6392637088c4b6a6a16

  Message:
    Use page.path to derive source_path

  Modified files:
    _layouts/base.html

  Modified: _layouts/base.html (+6 -11)
===================================================================
--- _layouts/base.html    2014-02-13 18:42:33 +0900 (959a8c3)
+++ _layouts/base.html    2014-02-13 19:00:37 +0900 (d5b7bb0)
@@ -70,17 +70,12 @@
           <li><a href="/ja/{{ relative_path }}">日本語</a></li>
         </ul>
         <p class="contribute">
-           {% if page.categories contains "news" %}
-             {% assign source_path = page.url | remove_first: "/news" | prepend: "/news/_posts" | remove: ".html" | append: ".md" %}
-           {% else %}
-             {% if page.language == "en" %}
-               {% assign source_path = page.url | remove: ".html" | append: ".md" %}
-             {% else %}
-                {% assign source_path = page.url | prepend: "/_po" | remove: ".html" | append: ".po" %}
-             {% endif %}
-           {% endif %}
-           {% assign source_path = source_path | prepend: "https://github.com/droonga/droonga.org/blob/gh-pages" %}
-           <a href="{{ source_path }}">{{ page.label_edit }}</a></p>
+          {% assign source_path = page.path %}
+          {% if page.language != "en" %}
+            {% assign source_path = source_path | prepend: "_po/" | replace_first: ".md", ".po" %}
+          {% endif %}
+          {% assign source_path = source_path | prepend: "https://github.com/droonga/droonga.org/blob/gh-pages/" %}
+          <a href="{{ source_path }}">{{ page.label_edit }}</a></p>
         <p class="copyright">&copy; {{ site.copyright_year }} <a href="https://github.com/droonga">Droonga Project</a></p>
       </div>
     </footer>
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index