mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-02 18:02:23 +00:00
Add separate configuration for MkDocs Insiders plugins (#5544)
## Summary
This PR adds a separate configuration file to enable us to turn on
[Insiders-only
plugins](https://squidfunk.github.io/mkdocs-material/insiders/getting-started/#built-in-plugins).
I've turned on the `typeset` plugin which ensures that the settings on
the left-hand navigation pane render as code:
<img width="1792" alt="Screen Shot 2023-07-05 at 6 27 20 PM"
src="c93676dd
-bb48-417a-9d3b-528bf001e9b7">
This commit is contained in:
parent
d097b49371
commit
c9e02c52a8
6 changed files with 12 additions and 3 deletions
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
@ -271,4 +271,4 @@ jobs:
|
|||
- name: "Check docs formatting"
|
||||
run: python scripts/check_docs_formatted.py
|
||||
- name: "Build docs"
|
||||
run: mkdocs build --strict -f mkdocs.generated.yml
|
||||
run: mkdocs build --strict -f mkdocs.insiders.yml
|
||||
|
|
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
run: |
|
||||
python scripts/transform_readme.py --target mkdocs
|
||||
python scripts/generate_mkdocs.py
|
||||
mkdocs build --strict -f mkdocs.generated.yml
|
||||
mkdocs build --strict -f mkdocs.insiders.yml
|
||||
- name: "Deploy to Cloudflare Pages"
|
||||
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
||||
uses: cloudflare/wrangler-action@2.0.0
|
||||
|
|
|
@ -256,7 +256,11 @@ To preview any changes to the documentation locally:
|
|||
1. Run the development server with:
|
||||
|
||||
```shell
|
||||
# For contributors.
|
||||
mkdocs serve -f mkdocs.generated.yml
|
||||
|
||||
# For members of the Astral org, which has access to MkDocs Insiders via sponsorship.
|
||||
mkdocs serve -f mkdocs.insiders.yml
|
||||
```
|
||||
|
||||
The documentation should then be available locally at
|
||||
|
|
|
@ -58,7 +58,7 @@ pub(crate) fn generate() -> String {
|
|||
let OptionEntry::Group(fields) = entry else {
|
||||
continue;
|
||||
};
|
||||
output.push_str(&format!("### `{group_name}`\n"));
|
||||
output.push_str(&format!("### {group_name}\n"));
|
||||
output.push('\n');
|
||||
for (name, entry) in fields.iter().sorted_by_key(|(name, _)| name) {
|
||||
let OptionEntry::Field(field) = entry else {
|
||||
|
|
4
mkdocs.insiders.yml
Normal file
4
mkdocs.insiders.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
INHERIT: mkdocs.generated.yml
|
||||
plugins:
|
||||
- search
|
||||
- typeset
|
|
@ -5,6 +5,7 @@ theme:
|
|||
favicon: assets/ruff-favicon.png
|
||||
features:
|
||||
- navigation.instant
|
||||
- navigation.instant.prefetch
|
||||
- navigation.tracking
|
||||
- content.code.annotate
|
||||
- toc.integrate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue