A Chrome extension that adds a floating table of contents sidebar to GitHub Markdown pages, making it easier to navigate long documentation.
- Automatic TOC Generation: Automatically extracts headers (H1-H4) from any GitHub Markdown page and generates a table of contents
- Smart Positioning: Automatically positions itself next to the Markdown content, avoiding CSS overflow clipping issues
- Scroll Tracking: Highlights the currently visible section as you scroll through the document
- Responsive Design: Adapts to available space with three modes:
- Full sidebar (≥260px width)
- Compact mode (160-259px width)
- Mini FAB mode (<160px width) - opens a modal when clicked
- Customizable: Configure sidebar position (left/right) and maximum header level to display (H1-H4)
- SPA Support: Works with GitHub's Turbo navigation for seamless browsing
- Chrome Web Store (Under Review ⏳)
- Microsoft Edge Add-ons (Under Review ⏳)
- Go to the Releases page and download the latest
.zipfile (e.g.,github-markdown-toc-v1.0.0.zip). - Unzip the downloaded file to a new folder.
- Open Chrome/Edge and navigate to
chrome://extensionsoredge://extensions. - Enable Developer mode in the top right corner.
- Click Load unpacked and select the unzipped folder.
-
Download or clone this repository:
git clone https://github.com/terranc/github-markdown-toc-sidebar.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" in the top right corner
-
Click "Load unpacked" and select the repository folder
-
The extension icon should appear in your Chrome toolbar
- Navigate to any GitHub repository's Markdown file (README, wiki, etc.)
- The TOC sidebar will automatically appear on the right side of the content
- Click any header in the TOC to jump to that section
- Use the header buttons to:
- Toggle sidebar position (left/right)
- Collapse/expand the sidebar
- In mini FAB mode (narrow view), click the button to open a modal with the full TOC
Click the extension icon in the Chrome toolbar to open the options page:
- Sidebar Position: Choose left or right side of the content
- Heading Levels: Select which header levels to include in the TOC (H1-H4)
Your settings are automatically saved and synced across devices if you're signed into Chrome.
- Chrome 88+ (Manifest V3)
- Edge 88+ (Chromium-based)
- Other Chromium-based browsers supporting Manifest V3
This extension has no build step. To make changes:
- Edit the source files directly
- Refresh the extension at
chrome://extensions/ - Reload any GitHub pages to see the changes
manifest.json- Extension configuration and permissionscontent.js- Main logic for TOC extraction and sidebar renderingcontent.css- Sidebar styling and responsive behavioroptions.html/js/css- Extension settings pageicons/- Extension icons in various sizes
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for better navigation on GitHub's long-form documentation
- Icons use GitHub's Primer design system
- Thanks to all contributors and users of this extension
