[Groonga-commit] pgroonga/pgroonga.github.io at 73d8646 [master] Fix upper level link

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 15 10:43:22 JST 2015


Kouhei Sutou	2015-10-15 10:43:22 +0900 (Thu, 15 Oct 2015)

  New Revision: 73d86462566f8bfe654087ec5c56bf2b884a3033
  https://github.com/pgroonga/pgroonga.github.io/commit/73d86462566f8bfe654087ec5c56bf2b884a3033

  Message:
    Fix upper level link

  Modified files:
    _includes/navbar-content.en.html

  Modified: _includes/navbar-content.en.html (+7 -1)
===================================================================
--- _includes/navbar-content.en.html    2015-10-15 10:28:20 +0900 (5f7ad7b)
+++ _includes/navbar-content.en.html    2015-10-15 10:43:22 +0900 (a869308)
@@ -37,7 +37,13 @@
     {% if page.upper_level != null %}
       <li><a href="{{ page.upper_level }}"><i class="fa fa-arrow-circle-up"></i> Up one level</a></li>
     {% elsif relative_path != "" %}
-      <li><a href="../"><i class="fa fa-arrow-circle-up"></i> Up one level</a></li>
+      {% capture last_component %}{{ page.url | split:"/" | last }}{% endcapture %}
+      {% if last_component == "index.html" %}
+        {% assign upper_level = "../" %}
+      {% else %}
+        {% assign upper_level = "./" %}
+      {% endif %}
+      <li><a href="{{ upper_level }}"><i class="fa fa-arrow-circle-up"></i> Up one level</a></li>
     {% endif %}
     <li>
       <a href="https://github.com/pgroonga/pgroonga"><i class="fa fa-github"></i> GitHub</a>
-------------- next part --------------
HTML����������������������������...
Download 



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