aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-02-11 23:06:48 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-02-11 23:06:48 +0100
commitfa58475a37b0cd4cd72ccb1aa09a92976c1adb80 (patch)
tree1a0974cc33daebdfaffdfc341f2616f51b67da82
parent4ce973a4e2ee74ff4cba33ea3c8bb8761c8e70ef (diff)
Add temporary workaround to higlight active linkn in menu bundle
-rw-r--r--exampleSite/config.yml3
-rw-r--r--layouts/partials/docs/menu-bundle.html5
2 files changed, 8 insertions, 0 deletions
diff --git a/exampleSite/config.yml b/exampleSite/config.yml
index 1e033b4..7c20c0f 100644
--- a/exampleSite/config.yml
+++ b/exampleSite/config.yml
@@ -18,6 +18,9 @@ params:
# if not specified file structure and weights will be used
BookMenuBundle: /menu
+ # This value is duplicate of $link-color for making active link highlight in menu bundle mode
+ # BookMenuBundleActiveLinkColor: \#004ed0
+
# specify section of content to render as menu
# if bookMenuBundle is not set, 'docs' is value by default
BookSection: docs
diff --git a/layouts/partials/docs/menu-bundle.html b/layouts/partials/docs/menu-bundle.html
index bdabefd..cf18aa3 100644
--- a/layouts/partials/docs/menu-bundle.html
+++ b/layouts/partials/docs/menu-bundle.html
@@ -1,3 +1,8 @@
+<style>
+nav ul a[href="{{- .Permalink -}}"] {
+ color: {{ default .Site.Params.BookMenuBundleActiveLinkColor "#004ed0" }};
+}
+</style>
{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
{{- .Content -}}
{{ end }} \ No newline at end of file