Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidakanchwala committed Oct 9, 2024
1 parent a87487d commit 4e3b236
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/kedro_sphinx_theme/theme/kedro-sphinx-theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@

// Iterate over each link to check if the current path includes the link's unique ID
navLinks.forEach(function(link) {
var kedroSpecificPath = 'https://docs.kedro.org/en';
var isKedroLink = link.id === 'kedro';

if ((isKedroLink && currentPath.includes(kedroSpecificPath)) || (!isKedroLink && currentPath.includes(link.id))) {
if (currentPath.includes("/projects/kedro-viz/en/") && link.id === 'kedro-viz') {
link.classList.add('active');
} else if (currentPath.includes("/projects/kedro-datasets/en/") && link.id === 'kedro-datasets') {
link.classList.add('active');
} else if (link.id === 'kedro') {
// Default to Kedro if no other match
link.classList.add('active');
}
});
});
</script>
{% endblock %}

0 comments on commit 4e3b236

Please sign in to comment.