Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onweru/compose.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweru <onewesh@gmail.com>2020-10-06 15:28:11 +0300
committerweru <onewesh@gmail.com>2020-10-06 15:28:11 +0300
commit2d7ab2bbc6a315838de02815d747640e0de51b18 (patch)
tree5027c7e54721bc65fe603dd9190cc22d0281aab0 /layouts
parente349ad6aac5c17bfc91b452219cb2925840a4e7c (diff)
update
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/nav.html8
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 }}