Skip to content

Commit 7a87aa8

Browse files
committed
only increment hits if we are in the root
1 parent 49ef027 commit 7a87aa8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_includes/navbar.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
<a class="navbar-brand" href="{{ site.baseurl }}/" style="text-align:center; padding-bottom: 12.5px;">
66
<h5><b>{{ site.title }}</b></h5>
77
</a>
8-
<a href="https://hits.sh/agarnung.github.io/">
9-
<img alt="Hits" src="https://hits.sh/agarnung.github.io.svg?style=plastic&label=visits&extraCount=20&color=5dd032&labelColor=605656&logo=githubpages"/>
10-
</a>
8+
<script>
9+
if (window.location.pathname === "/" || window.location.pathname === "/index.html") {
10+
document.write('<a href="https://hits.sh/agarnung.github.io/"><img alt="Hits" src="https://hits.sh/agarnung.github.io.svg?style=plastic&label=visits&extraCount=20&color=5dd032&labelColor=605656&logo=githubpages"/></a>');
11+
}
12+
</script>
1113
</div>
1214
</a>
1315

0 commit comments

Comments
 (0)