Skip to content

Language name in code blocks #7882

Discussion options

You must be logged in to vote

Nice solution, very ingenious 🤩

The highlight extension also has the auto_title option, which would use the title of the lexer as the title of the code block when none is given, simpler but also worse solution, still worth noting.

Since you've gone the extra mile to try it out yourself, then I'd say it's worth adding the whole example.zip to the answer, as this could also clear up some misunderstandings. However, there are people that won't download zips, because it's too much work, which I've re-learned recently that the code block / screenshot is king.

Since the CSS is additive, I tried a quick hack in the browser tools, one could define CSS variables for the exact language match, even …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kamilkrzyskow
Comment options

Answer selected by pushbroomsweep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants