Skip to content

Make distinct code and console admonitions so readers are less likely to miss them #20585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hmellor
Copy link
Member

@hmellor hmellor commented Jul 7, 2025

Adds two new admonition types:

  • code
  • console

They have the colours of the question admonition (which we do not use) and each have their own icon.

This was done so that they are visually disinct from the default note admonition so users are more likely to notice them. It was noted in #19926 (comment) that the admonitions as they were could easily be missed.

image

image

cc @davidxia

Copy link

github-actions bot commented Jul 7, 2025

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @hmellor, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the readability and clarity of the project's documentation by introducing new, visually distinct admonition types for code examples and console commands. The changes standardize the presentation of these critical information blocks, making it easier for users to quickly identify and understand them.

Highlights

  • New Admonition Types: Introduced two new admonition types, code and console, to visually differentiate code snippets and console commands within the documentation. This aims to make these important sections more noticeable to readers.
  • Enhanced Visual Styling: Defined distinct SVG icons and a consistent green color scheme (#64dd17) for the new code and console admonitions in docs/mkdocs/stylesheets/extra.css. This provides a clear visual cue, making them stand out from generic note admonitions.
  • Documentation Standardization: Applied the new code and console admonition types across a wide range of documentation files. This involved replacing various less specific admonition labels (e.g., Code, Command, Examples, Logs, Output, Response, Request, Config, Yaml, Json, CLI example, Dependency versions, note) to ensure consistent and improved presentation throughout the documentation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new code and console admonition types to improve the visual distinction of code blocks and console interactions in the documentation. The changes are applied consistently across a large number of markdown files. The implementation in CSS is also correct. I've provided feedback to improve consistency and code quality.

@@ -95,7 +95,7 @@ Notes:
- The below example assumes GPU backend used. If you are using CPU backend, remove `--gpus device=ID`, add `VLLM_CPU_KVCACHE_SPACE` and `VLLM_CPU_OMP_THREADS_BIND` environment variables to the docker run command.
- Adjust the model name that you want to use in your vLLM servers if you don't want to use `Llama-2-7b-chat-hf`.

??? Commands
??? console "Commands"

```console
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This block contains an Nginx configuration snippet, which is a type of code. Using the code admonition would be more semantically correct and consistent with its usage in other parts of the documentation for configuration files.

Suggested change
```console
??? code "Command"

Comment on lines +54 to +61
.md-typeset .admonition.code,
.md-typeset details.code {
border-color: #64dd17
}
.md-typeset .admonition.console,
.md-typeset details.console {
border-color: #64dd17
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The CSS rules for .admonition.code, details.code, .admonition.console, and details.console are identical. To improve maintainability and reduce code duplication, these selectors can be combined into a single rule.

.md-typeset .admonition.code,
.md-typeset details.code,
.md-typeset .admonition.console,
.md-typeset details.console {
  border-color: #64dd17;
}

Comment on lines +71 to +78
.md-typeset .code > .admonition-title,
.md-typeset .code > summary {
background-color: #64dd171a;
}
.md-typeset .console > .admonition-title,
.md-typeset .console > summary {
background-color: #64dd171a;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The CSS rules for the title and summary of code and console admonitions are identical. To improve maintainability and reduce code duplication, these selectors can be combined into a single rule.

.md-typeset .code > .admonition-title,
.md-typeset .code > summary,
.md-typeset .console > .admonition-title,
.md-typeset .console > summary {
  background-color: #64dd171a;
}

@@ -172,7 +172,7 @@ Alternatively, follow these example steps to implement your own plugin:

1. Implement the LoRAResolver interface.

??? Example of a simple S3 LoRAResolver implementation
??? code "Example of a simple S3 LoRAResolver implementation"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a code example, so it should be code instead of Example.

Suggested change
??? code "Example of a simple S3 LoRAResolver implementation"
??? code "Example of a simple S3 LoRAResolver implementation"

@@ -642,7 +642,7 @@ Specified using `--task generate`.

For the best results, we recommend using the following dependency versions (tested on A10 and L40):

??? Dependency versions
??? code "Dependency versions"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a code example, so it should be code instead of Dependency versions.

Suggested change
??? code "Dependency versions"
??? code "Dependency versions"

@DarkLight1337
Copy link
Member

This looks much better, thanks!

@vllm-bot vllm-bot merged commit af107d5 into vllm-project:main Jul 8, 2025
16 checks passed
@hmellor hmellor deleted the distinct-code-console-admonitions branch July 8, 2025 07:03
huydhn pushed a commit to huydhn/vllm that referenced this pull request Jul 8, 2025
Chen-zexi pushed a commit to Chen-zexi/vllm that referenced this pull request Jul 13, 2025
patrickvonplaten pushed a commit to patrickvonplaten/vllm that referenced this pull request Jul 15, 2025
…kely to miss them (vllm-project#20585)

Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Patrick von Platen <[email protected]>
LyrisZhong pushed a commit to LyrisZhong/vllm that referenced this pull request Jul 23, 2025
avigny pushed a commit to avigny/vllm that referenced this pull request Jul 31, 2025
Pradyun92 pushed a commit to Pradyun92/vllm that referenced this pull request Aug 6, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation structured-output tool-calling
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants