Fixed PanosSakkos/personal-jekyll-theme#63 issue
If the page is distinct to index.html, Blog item of navigation redirect to blog/index.html
This commit is contained in:
parent
81f3a54bff
commit
c7f1345414
1 changed files with 8 additions and 14 deletions
|
|
@ -13,7 +13,7 @@
|
|||
<a class="navbar-brand page-scroll" href="{{site.baseurl}}/index.html#page-top">
|
||||
{% endif %}
|
||||
<div>{% if site.black-favicon %}<img src="{{site.baseurl}}{{ site.black-favicon }}" alt=""> {% endif %}{{ site.title }}</div>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
|
||||
|
|
@ -23,27 +23,21 @@
|
|||
<!-- Scroll to section for each page in index -->
|
||||
{% for p in site.pages_list %}
|
||||
<li>
|
||||
<a class="page-scroll" href="#{{ p[1] }}"> {{ p[0] }} </a>
|
||||
<a class="page-scroll" href="#{{ p[1] }}"> {{ p[0] }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<!-- Blog, Post, Tag pages-->
|
||||
{% for p in site.pages_list %}
|
||||
{% if page.section-type == "blog" and p[0] == "Blog" %}
|
||||
<!-- Blog button in blog.html doesn't refresh the page -->
|
||||
<li>
|
||||
<a class="page-scroll" href="#blog"> {{ p[0] }} </a>
|
||||
</li>
|
||||
{% elsif p[0] == "Blog" %}
|
||||
<li>
|
||||
<a class="page-scroll" href="{{site.baseurl}}/blog/index.html"> {{ p[0] }} </a>
|
||||
</li>
|
||||
<li>
|
||||
{% comment %} If are blog, redirect to index.html of Blog {% endcomment %}
|
||||
{% if p[1] == "latest-post" %}
|
||||
<a class="page-scroll" href="{{site.baseurl}}/blog/index.html"> {{ p[0] }}</a>
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="page-scroll" href="{{site.baseurl}}/index.html#{{ p[1] }}"> {{ p[0] }} </a>
|
||||
</li>
|
||||
<a class="page-scroll" href="{{site.baseurl}}/index.html#{{ p[1] }}"> {{ p[0] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue