mirror of https://github.com/astral-sh/ruff
Use MkDocs' `not_in_nav` (#5498)
Closes #5497 Needs MkDocs 1.5 to be released. - [x] https://github.com/mkdocs/mkdocs/milestone/15 ## Summary Uses MkDocs' `not_in_nav` config to hide spam about files in `docs/rules/` not being in nav.
This commit is contained in:
parent
3e1dffab20
commit
40f6456add
|
|
@ -103,7 +103,7 @@ fn process_documentation(documentation: &str, out: &mut String) {
|
|||
|
||||
let anchor = option.replace('.', "-");
|
||||
out.push_str(&format!("- [`{option}`][{option}]\n"));
|
||||
after.push_str(&format!("[{option}]: ../../settings#{anchor}\n"));
|
||||
after.push_str(&format!("[{option}]: ../settings.md#{anchor}\n"));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
@ -151,8 +151,8 @@ Something [`else`][other].
|
|||
|
||||
[other]: http://example.com.
|
||||
|
||||
[task-tags]: ../../settings#task-tags
|
||||
[mccabe.max-complexity]: ../../settings#mccabe-max-complexity
|
||||
[task-tags]: ../settings.md#task-tags
|
||||
[mccabe.max-complexity]: ../settings.md#mccabe-max-complexity
|
||||
"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ pub(crate) fn generate() -> String {
|
|||
table_out.push('\n');
|
||||
|
||||
table_out.push_str(&format!(
|
||||
"The {PREVIEW_SYMBOL} emoji indicates that a rule in [\"preview\"](../faq/#what-is-preview)."
|
||||
"The {PREVIEW_SYMBOL} emoji indicates that a rule in [\"preview\"](faq.md#what-is-preview)."
|
||||
));
|
||||
table_out.push('\n');
|
||||
table_out.push('\n');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PyYAML==6.0
|
||||
black==23.3.0
|
||||
mkdocs==1.4.3
|
||||
git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git
|
||||
mkdocs==1.5.0
|
||||
git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git@38c0b8187325c3bab386b666daf3518ac036f2f4
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PyYAML==6.0
|
||||
black==23.3.0
|
||||
mkdocs==1.4.3
|
||||
mkdocs==1.5.0
|
||||
mkdocs-material==9.1.18
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ plugins:
|
|||
- search
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
not_in_nav: |
|
||||
/rules/*
|
||||
extra:
|
||||
analytics:
|
||||
provider: fathom
|
||||
|
|
|
|||
Loading…
Reference in New Issue