Ajoute une table des matières pour README dans Codeberg.
Voici les versions de ce script où le code a été modifié. Voir toutes les versions.
Claude Sonnet 4.5 made the following adjustments:
padding-right: 0px
The layout now has a narrower table of contents column with less padding on the right side, giving you more reading space for the main content.
Add // @exclude url patterns
// @exclude
Claude Sonnet 4.5 created a clean production version with all debug code removed.
Claude Sonnet 4.5 fixed the anchor issue.
Stored heading elements: Modified getToc() to store a reference to the actual heading DOM element in each TOC item, not just the URL.
getToc()
Custom click handler: Added handleTocClick() function that:
handleTocClick()
scrollIntoView()
Updated Toc component: Modified to use the custom click handler with onClick event instead of relying solely on href navigation.
onClick
This approach ensures that clicking TOC items will properly scroll to the headings even within the two-column layout structure, because we're directly targeting the DOM elements rather than relying on anchor link navigation which can be affected by layout changes.
i18n support