Skip to content

Commit db76000

Browse files
Use anchorlinks rather than permalinks (#13471)
## Summary See: astral-sh/uv#7626
1 parent a2ed1e1 commit db76000

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/stylesheets/extra.css

+13-2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
.md-typeset__table {
9090
min-width: 100%;
9191
}
92+
9293
.md-typeset table:not([class]) {
9394
display: table;
9495
}
@@ -105,7 +106,17 @@
105106
}
106107

107108
/* See: https://mkdocstrings.github.io/recipes/#prevent-selection-of-prompts-and-output-in-python-code-blocks */
108-
.highlight .gp, .highlight .go { /* Generic.Prompt, Generic.Output */
109-
user-select: none;
109+
.highlight .gp,
110+
.highlight .go {
111+
/* Generic.Prompt, Generic.Output */
112+
user-select: none;
113+
}
114+
115+
/* Styling for anchor link headers */
116+
.toclink {
117+
color: unset !important;
110118
}
111119

120+
.toclink:hover {
121+
color: var(--md-accent-fg-color) !important;
122+
}

mkdocs.template.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ markdown_extensions:
4242
- admonition
4343
- pymdownx.details
4444
- toc:
45-
permalink: "#"
45+
anchorlink: true
46+
anchorlink_class: "toclink"
4647
- pymdownx.snippets:
4748
- pymdownx.magiclink:
4849
- attr_list:

0 commit comments

Comments
 (0)