Rollup merge of #140113 - Urgau:rustc-book-page-toc, r=ehuss

Add per page TOC in the `rustc` book

This PR adds per page Table of Content (TOC) in the `rustc` book (to be extended in the future to our other books).

The goal is to easy the navigation inside the page by providing quick overview of the page content and our position inside that page.

That functionality is unfortunately not available natively in `mdbook`, which prompted community members to create [mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc/) (which this PR is heavily inspired by). It's "only" a JS file (to handle the TOC) and a CSS file (to handle the margin, colors, screen size, ...), there is no "post-processor" needed (in mdbook sense).

![image](https://github.com/user-attachments/assets/9e790bea-059d-414e-b4a5-ac8170f57e27)

Live preview at: http://urgau.rf.gd/book

r? ```@jieyouxu```
This commit is contained in:
León Orell Valerian Liehr 2025-05-18 11:03:44 +02:00 committed by GitHub
commit 7f26df9852
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available