From 403a5ec12625d3c132f0c4ef766213ee5fe96d63 Mon Sep 17 00:00:00 2001 From: Ubospica Date: Tue, 29 Sep 2026 15:20:41 -0400 Subject: [PATCH 1/3] Add book home link to sidebar navigation --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 4e269b4..a80748f 100644 --- a/conf.py +++ b/conf.py @@ -50,7 +50,7 @@ "use_fullscreen_button": False, "show_navbar_depth": 1, "show_toc_level": 2, - "home_page_in_toc": False, + "home_page_in_toc": True, "navbar_persistent": [], } html_show_sourcelink = True From 9d0468ce5043f66ec3eabc4385084296e54a551d Mon Sep 17 00:00:00 2001 From: Ubospica Date: Tue, 29 Sep 2026 15:25:06 -0400 Subject: [PATCH 2/3] Show linked book title above sidebar search --- _static/book.css | 10 ++++++++++ _templates/book-title.html | 3 +++ conf.py | 14 ++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 _templates/book-title.html diff --git a/_static/book.css b/_static/book.css index c509371..c135af2 100644 --- a/_static/book.css +++ b/_static/book.css @@ -21,6 +21,16 @@ html[data-theme="dark"] { .bd-article-container { max-width: 53rem; } .bd-article h2 { margin-top: 2.2rem; } .logo__image.only-dark { background: white; padding: 4px 8px; border-radius: 6px; } +.sidebar-book-title { + margin: 0; + font-family: var(--pst-font-family-heading); + font-size: 1.25rem; + font-weight: 700; + line-height: 1.3; + letter-spacing: -0.02em; +} +.sidebar-book-title a { color: var(--pst-color-text-base); text-decoration: none; } +.sidebar-book-title a:hover { color: var(--pst-color-link); text-decoration: underline; text-underline-offset: 0.15em; } table.docutils th { white-space: normal; } .bd-article a { text-underline-offset: 0.18em; } .chapter-figure { margin: 1.8rem 0; } diff --git a/_templates/book-title.html b/_templates/book-title.html new file mode 100644 index 0000000..bc6fec7 --- /dev/null +++ b/_templates/book-title.html @@ -0,0 +1,3 @@ + diff --git a/conf.py b/conf.py index a80748f..1d1ec2f 100644 --- a/conf.py +++ b/conf.py @@ -35,6 +35,16 @@ } html_theme = "sphinx_book_theme" +templates_path = ["_templates"] +html_sidebars = { + "**": [ + "navbar-logo.html", + "book-title.html", + "icon-links.html", + "search-button-field.html", + "sbt-sidebar-nav.html", + ], +} html_context = {"default_mode": "auto"} html_title = project html_baseurl = "https://mlc.ai/agentic-gpu-programming-for-mlsys/" @@ -43,14 +53,14 @@ html_css_files = ["book.css"] html_js_files = ["book-tabs.js", "fold-code.js"] html_theme_options = { - "logo": {"link": "https://mlc.ai/"}, + "logo": {"link": "https://mlc.ai/", "alt_text": "Machine Learning Compilation home"}, "repository_url": "https://github.com/mlc-ai/agentic-gpu-programming-for-mlsys", "use_repository_button": True, "use_download_button": False, "use_fullscreen_button": False, "show_navbar_depth": 1, "show_toc_level": 2, - "home_page_in_toc": True, + "home_page_in_toc": False, "navbar_persistent": [], } html_show_sourcelink = True From 6a0dd21ff0d8077e9877bbd1ff9daa879e274eb7 Mon Sep 17 00:00:00 2001 From: Ubospica Date: Tue, 29 Sep 2026 15:27:54 -0400 Subject: [PATCH 3/3] Use regular weight for the sidebar book title --- _static/book.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_static/book.css b/_static/book.css index c135af2..fa38fc6 100644 --- a/_static/book.css +++ b/_static/book.css @@ -25,7 +25,7 @@ html[data-theme="dark"] { margin: 0; font-family: var(--pst-font-family-heading); font-size: 1.25rem; - font-weight: 700; + font-weight: 400; line-height: 1.3; letter-spacing: -0.02em; }