mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-25 06:13:01 +00:00
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
5 changed files with 9 additions and 7 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue