Skip to content

Commit e3f7ae9

Browse files
committed
Remove link from navigation for actual page
1 parent 3061494 commit e3f7ae9

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jekyll-archives:
3939
- categories
4040
layout: topic
4141
permalinks:
42-
category: '/topic/:name/'
42+
category: '/blog/topic/:name/'
4343

4444
# jekyll-polyglot preferences
4545
languages: ["en", "fr"]

_includes/header.html

+4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515
<div class="trigger">
1616
{% for item in site.data.navigation %}
17+
{% if page.url contains item.name or page.layout == item.name %}
18+
<span class="page-link">{{ site.data.strings[item.name] }}</span>
19+
{% else %}
1720
<a class="page-link" href="{{ item.url | relative_url }}">{{ site.data.strings[item.name] }}</a>
21+
{% endif %}
1822
{% endfor %}
1923
</div>
2024
</nav>

_includes/topic-switcher.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% if topic_name == page.title %}
1111
{{ site.data.strings.topics[topic_name] }}
1212
{% else %}
13-
<a href="/topic/{{ topic_name }}">{{ site.data.strings.topics[topic_name] }}</a>
13+
<a href="/blog/topic/{{ topic_name }}">{{ site.data.strings.topics[topic_name] }}</a>
1414
{% endif %}
1515
{% if forloop.last == false %}
1616
|

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}
2121
2222
{% endif %}
2323
{% assign topic_name = category[0] %}
24-
<a href="/topic/{{ topic_name }}">{{ site.data.strings.topics[topic_name] }}</a>
24+
<a href="/blog/topic/{{ topic_name }}">{{ site.data.strings.topics[topic_name] }}</a>
2525
{% if forloop.last == false %}
2626
|
2727
{% endif %}

0 commit comments

Comments
 (0)