From 2d7ab2bbc6a315838de02815d747640e0de51b18 Mon Sep 17 00:00:00 2001
From: weru <onewesh@gmail.com>
Date: Tue, 06 Oct 2020 12:28:11 +0000
Subject: [PATCH] update

---
 layouts/partials/nav.html |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 02a1594..7f47156 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -22,9 +22,11 @@
 			{{- with .Page }}
 			{{- $active = or $active ( $.IsDescendant .)  }}
 			{{- end }}
-			{{- $url := urls.Parse .URL }}
-			{{- $baseurl := $.Site.BaseURL }}
-			<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ $baseurl }}{{ .Permalink }}{{ else }}{{ $baseurl }}{{ .URL }}{{ end }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
+			{{- $url := absURL .URL }}
+			{{- if or (hasPrefix .URL "http") (hasPrefix .URL "www.") }}
+				{{- $url = .URL }}
+			{{- end }}
+			<a class="nav-link{{if $active }} active{{end}}" href="{{ $url }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
 		</li>
 		{{- end }}
 		{{ $repo := .Site.Params.source }}

--
Gitblit v1.10.0