Skip to content

Add Support for Displaying Language Name Option as a Header in Rouge #2119

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

Open
0xh3xa opened this issue Mar 22, 2025 · 0 comments
Open

Add Support for Displaying Language Name Option as a Header in Rouge #2119

0xh3xa opened this issue Mar 22, 2025 · 0 comments
Labels
enhancement-request A request for an enhancement to be developed.

Comments

@0xh3xa
Copy link
Contributor

0xh3xa commented Mar 22, 2025

Is your enhancement request related to a problem?

Currently, Rouge does not provide an option to display the programming language name as a header above the code block. This makes it difficult for users to quickly identify the language, especially when multiple code snippets are present in a document. It would enhance readability and usability if the language name was automatically displayed.

Image

Describe the solution you'd like

I would like Rouge to include an option that allows the language name to be displayed as a header above the code block. This could be implemented as:

  • An optional setting in Jekyll or Rouge itself.

  • A built-in style that adds the language name dynamically before rendering the code block.

  • A CSS class or additional metadata that allows themes to customize the appearance of the language header.

Additional context

Many other syntax highlighters, such as Prism.js and Highlight.js, offer this feature, making it easier for users to identify languages at a glance. Implementing this in Rouge would improve its usability and make it a more feature-complete option for static site generators like Jekyll.

For example the following:

Image

Would love to hear your thoughts on whether this is feasible and how best it could be integrated into Rouge!

@0xh3xa 0xh3xa added the enhancement-request A request for an enhancement to be developed. label Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-request A request for an enhancement to be developed.
Projects
None yet
Development

No branches or pull requests

1 participant