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:
Micael Jarniac 2023-09-18 21:01:43 -03:00 committed by GitHub
parent 3e1dffab20
commit 40f6456add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -103,7 +103,7 @@ fn process_documentation(documentation: &str, out: &mut String) {
let anchor = option.replace('.', "-"); let anchor = option.replace('.', "-");
out.push_str(&format!("- [`{option}`][{option}]\n")); 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; continue;
} }
@ -151,8 +151,8 @@ Something [`else`][other].
[other]: http://example.com. [other]: http://example.com.
[task-tags]: ../../settings#task-tags [task-tags]: ../settings.md#task-tags
[mccabe.max-complexity]: ../../settings#mccabe-max-complexity [mccabe.max-complexity]: ../settings.md#mccabe-max-complexity
" "
); );
} }

View File

@ -61,7 +61,7 @@ pub(crate) fn generate() -> String {
table_out.push('\n'); table_out.push('\n');
table_out.push_str(&format!( 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');
table_out.push('\n'); table_out.push('\n');

View File

@ -1,4 +1,4 @@
PyYAML==6.0 PyYAML==6.0
black==23.3.0 black==23.3.0
mkdocs==1.4.3 mkdocs==1.5.0
git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git@38c0b8187325c3bab386b666daf3518ac036f2f4

View File

@ -1,4 +1,4 @@
PyYAML==6.0 PyYAML==6.0
black==23.3.0 black==23.3.0
mkdocs==1.4.3 mkdocs==1.5.0
mkdocs-material==9.1.18 mkdocs-material==9.1.18

View File

@ -51,6 +51,8 @@ plugins:
- search - search
extra_css: extra_css:
- stylesheets/extra.css - stylesheets/extra.css
not_in_nav: |
/rules/*
extra: extra:
analytics: analytics:
provider: fathom provider: fathom