about summary refs log tree commit diff
path: root/layouts/partials/breadcrumbs.html
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2023-07-31 16:46:33 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2023-07-31 16:46:33 +0700
commite19108bbf10b876fbf55ee82f19dd0dda4f9324c (patch)
tree131f4b5087aa6ae5303b18cd82c0a70add1e23d0 /layouts/partials/breadcrumbs.html
parent5c9e0ecbb5e5d8c777bef62a0074c91b4ff80553 (diff)
downloadvictor-e19108bbf10b876fbf55ee82f19dd0dda4f9324c.tar.gz
Use range+where instead of range+if
Diffstat (limited to 'layouts/partials/breadcrumbs.html')
-rw-r--r--layouts/partials/breadcrumbs.html4
1 files changed, 1 insertions, 3 deletions
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 3dc235b..04c4ac3 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -1,12 +1,10 @@
 <nav aria-label="breadcrumb" class="breadcrumb">
   <ol>
-    {{ range .Ancestors.Reverse }}
-    {{ if in .Params.categories "book" }}
+    {{ range where .Ancestors.Reverse "Params.categories" "intersect" (slice "book") }}
       <li>
         <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
       </li>
     {{ end }}
-    {{ end }}
     <li class="active">
       <a aria-current="page">{{ .LinkTitle }}</a>
     </li>