diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 58969ed587..211c90d17b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 56774ee991..986ba0fa4c 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index efd43b4c7e..8c51d5f6b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/crates/ruff_dev/src/generate_options.rs b/crates/ruff_dev/src/generate_options.rs index 4e9c5fe681..7737f2097f 100644 --- a/crates/ruff_dev/src/generate_options.rs +++ b/crates/ruff_dev/src/generate_options.rs @@ -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 { diff --git a/mkdocs.insiders.yml b/mkdocs.insiders.yml new file mode 100644 index 0000000000..7435eb6a01 --- /dev/null +++ b/mkdocs.insiders.yml @@ -0,0 +1,4 @@ +INHERIT: mkdocs.generated.yml +plugins: + - search + - typeset diff --git a/mkdocs.template.yml b/mkdocs.template.yml index 761c36be23..8f4ec08a09 100644 --- a/mkdocs.template.yml +++ b/mkdocs.template.yml @@ -5,6 +5,7 @@ theme: favicon: assets/ruff-favicon.png features: - navigation.instant + - navigation.instant.prefetch - navigation.tracking - content.code.annotate - toc.integrate