Skip to content

Commit 3937929

Browse files
committed
Update header.html
Allow external links
1 parent 63b2945 commit 3937929

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

themes/influencer-hugo/layouts/partials/header.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ <h2 class="mb-0 text-color">{{ .Site.Title }}</h2>
2020
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
2121
{{ range .Site.Menus.main }}
2222
<li class="nav-item">
23-
<a class="nav-link smoth-scroll" href="{{ $.Site.BaseURL }}{{ .URL }}">{{ .Name }}</a>
23+
{{ if strings.HasPrefix .URL "http" }}
24+
<a class="nav-link" href="{{ .URL }}" rel="noopener">{{ .Name }}</a>
25+
{{ else }}
26+
<a class="nav-link" href="{{ $.Site.BaseURL }}{{ .URL }}">{{ .Name }}</a>
27+
{{ end }}
2428
</li>
2529
{{ end }}
2630
</ul>

0 commit comments

Comments
 (0)