-
Notifications
You must be signed in to change notification settings - Fork 20
add fix-toc script #332
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
base: main
Are you sure you want to change the base?
add fix-toc script #332
Conversation
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.
Pull Request Overview
This PR adds a JavaScript script to fix table of contents (TOC) scrolling behavior for MkDocs-based documentation sites. The script ensures proper highlighting of TOC items and smooth scrolling with header offset compensation.
- Implements smooth scrolling with header offset when clicking anchor links
- Updates TOC highlighting based on current scroll position
- Adds periodic verification to handle delayed rendering scenarios
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Style Guide Violations Summary
|
Verification ReviewThis review focuses on style guide claims, justifications, and confidence scores in the provided documents.
|
Description
This script improves the table of contents (TOC) behavior for MkDocs-based documentation sites. It ensures that both the left and right navigation TOCs highlight the correct heading as the user scrolls or clicks anchor links.
Related to Tanssi Mkdocs 87
Checklist
tanssi-mkdocsto update redirects