Skip to content

Conversation

@nginx-jack
Copy link
Collaborator

@nginx-jack nginx-jack commented Dec 23, 2025

A rough implementation of a toc highlight.
Styling only adds bolding to prove the js works.
As you scroll, the current header "section" you're on is highlighted. Visible https://frontdoor-test-docs.nginx.com/previews/nginx-hugo-theme/455/nginx/installing-nginx-open-source/#choosing-between-a-stable-or-a-mainline-version

Screenshot 2025-12-23 at 14 10 32

@nginx-jack nginx-jack requested a review from a team as a code owner December 23, 2025 14:12
@github-actions
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-hugo-theme/455/

Copy link
Collaborator

@lamATnginx lamATnginx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this and adding this big QoL. My main complaint is with the InstersectionObserver could be tweaked more so it picks up on "active" state in the same position as if I had the heading link.

Right now it is registering the next heading as "active" while I am still reading the current heading:
Screenshot 2025-12-23 at 8 22 28 AM

@nginx-jack
Copy link
Collaborator Author

Thanks for working on this and adding this big QoL. My main complaint is with the InstersectionObserver could be tweaked more so it picks up on "active" state in the same position as if I had the heading link.

Right now it is registering the next heading as "active" while I am still reading the current heading: Screenshot 2025-12-23 at 8 22 28 AM

Yeah makes sense, I'll move the variables that control this behaviour out of the function so they can easily be tweaked and tested. Something for @danielledeleo to play with after the holidays 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants