-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update template to fix active page #1134
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Will update the PR to have wider clean ups and make this more consistent across all templates. |
@@ -251,17 +251,21 @@ | |||
Kubernetes | |||
</label> | |||
<ul class="menu-list accordion-menu-item-content"> | |||
<li><a {{#if (active_project request.spin-full-url "/spin/v2/kubernetes" )}} class="active" | |||
{{/if}} href="{{site.info.base_url}}/spin/v2/kubernetes">Spin on Kubernetes</a> | |||
<li><a {{#if (active_content request.spin-path-info "/kubernetes" )}} class="active" {{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @karthik2804
My apologies; I don't understand the changes here active_content
vs active_project
and path-info
vs full-url
.
When I preview the documentation side by side with a checkout of this PR they seem to have the same behaviour. I feel like I am totally missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @tpmccallum This address the issue pointed out in this PR comment
Will be sure to check this is fully resolved as part of the v3_ToC work. |
Switching from highlighting active elements based on a partial match to needing a full match for
/kubernetes
as that is a substring in other URLs.If we prefer to update everything to need a full match to keep up with consistency, I can do that as well. But I think I will make a follow-up PR cleaning up templates a little bit.