diff --git a/doc/api/index.md b/doc/api/index.md
index f7b55c3a0cf132..c0980fd798cb06 100644
--- a/doc/api/index.md
+++ b/doc/api/index.md
@@ -7,7 +7,6 @@
* [About this documentation](documentation.md)
* [Usage and example](synopsis.md)
-* Index
diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css
index cb9d6021ffd329..5d3b19a21befa1 100644
--- a/doc/api_assets/style.css
+++ b/doc/api_assets/style.css
@@ -165,9 +165,9 @@ em code {
line-height: 1.5rem;
}
-#gtoc li {
+/* #gtoc li {
white-space: nowrap;
-}
+} */
li.picker-header {
position: relative;
@@ -800,6 +800,7 @@ kbd {
position: sticky;
top: -1px;
padding-top: 1rem;
+ z-index: 1;
}
.header .pinner-header {
@@ -842,7 +843,7 @@ kbd {
outline: var(--brand3) dotted 2px;
}
-@media only screen and (max-width: 576px) {
+@media only screen and (max-width: 600px) {
.header.is-pinned {
position: relative;
}
@@ -856,7 +857,7 @@ kbd {
}
}
-@media only screen and (min-width: 577px) {
+@media only screen and (min-width: 601px) {
#gtoc > ul > li {
display: inline;
border-right: 1px currentColor solid;
diff --git a/doc/template.html b/doc/template.html
index 36eaa27ac86802..2da95cf1a72347 100644
--- a/doc/template.html
+++ b/doc/template.html
@@ -41,15 +41,26 @@ Node.js __VERSION__ documentation
diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs
index 5aa29bb486fd1b..1c5ad61182bc79 100644
--- a/tools/doc/html.mjs
+++ b/tools/doc/html.mjs
@@ -530,9 +530,15 @@ function gtocPicker(id) {
return '';
}
+ // Highlight the current module and add a link to the index
const gtoc = gtocHTML.replace(
`class="nav-${id}"`, `class="nav-${id} active"`
- );
+ ).replace('', `
+
+ Index
+
+
+ `);
return `