From 00988ceee114705f04fadb339b4eed964408064f Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 8 Oct 2019 23:17:30 +0200 Subject: Remove BookMenuBundleActiveLinkColor parameter --- layouts/partials/docs/menu-bundle.html | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/docs/menu-bundle.html b/layouts/partials/docs/menu-bundle.html index eced12e..ddaac52 100644 --- a/layouts/partials/docs/menu-bundle.html +++ b/layouts/partials/docs/menu-bundle.html @@ -1,19 +1,4 @@ -{{ template "hrefhack" . }} {{ with .Site.GetPage .Site.Params.BookMenuBundle }} - {{- .Content -}} -{{ end }} - -{{ define "hrefhack" }} - {{ $attrEq := "$=" }} - {{ $attrVal := .RelPermalink }} - {{ if eq .RelPermalink "/" }} - {{ $attrEq = "=" }} - {{ $attrVal = .Permalink }} - {{ end }} - - + {{- $href := printf "href=\"%s\"" $.RelPermalink -}} + {{- replace .Content $href (print $href "class=active") | safeHTML -}} {{ end }} -- cgit v1.2.3