X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/430d4da65c609d1fde6e3cd428e7591b58cfd9e9..8a27fe370239ecb8e50d53f46b45ed61203a35ca:/doc/_includes/_navbar_left.liquid diff --git a/doc/_includes/_navbar_left.liquid b/doc/_includes/_navbar_left.liquid index c97023fa0d..2e18980f23 100644 --- a/doc/_includes/_navbar_left.liquid +++ b/doc/_includes/_navbar_left.liquid @@ -1,3 +1,35 @@ +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} + +{% assign highlighturl = "" %} +{% for section in site.navbar[page.navsection] %} + {% for entry in section %} + {% comment %} + Want to highlight the current page on the left nav. + But some pages have been renamed with a symlink from the old page to the new one. + Then the URL won't match. + So if the URL doesn't match, as a fallback look for a page with a matching title. + {% endcomment %} + + {% for item in entry[1] %} + {% if site.pages[item].url == page.url %} + {% assign highlighturl = site.pages[item].url %} + {% endif %} + {% endfor %} + + {% if highlighturl == "" %} + {% for item in entry[1] %} + {% if site.pages[item].title == page.title %} + {% assign highlighturl = site.pages[item].url %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} +{% endfor %} +