diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-06-20 06:36:36 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-06-20 06:36:36 +0300 |
commit | 2f3483d3c6ff0c4accdc12cb14ff40e0da8538cc (patch) | |
tree | 559a97026f730d854ecf69035c4a37cda0f6201b | |
parent | 62ffdf049d81237d9031696f6940da2417a9e217 (diff) |
regex to get section from .File.Dir in macOS
-rw-r--r-- | layouts/partials/navbar.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 00d5c62..46c9530 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -15,7 +15,7 @@ <div class="dropdown-content p-2 bg-dark2 mt-2 rounded w-auto mt-1" style="min-width: 200px;">
<ul class="list-unstyled">
{{ range .Site.Sections.ByWeight }}
- {{ $thisSection := replace .File.Dir "\\" "" }}
+ {{ $thisSection := replace (replace .File.Dir "\\" "") "/" "" }}
{{ if not (in (slice "alltaxa" "archive") $thisSection) }}
<li class="pt-2">
<a href="{{ .Permalink }}">{{ .Title }}</a>
|