Bug 471501

Summary: Add SyntaxHighlight extension.
Product: [Websites] KDE MediaWiki Reporter: Andrew Shark <ashark>
Component: generalAssignee: carl <schwancarl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andrew Shark 2023-06-27 12:38:45 UTC
For the wiki pages, it would be good to show syntax highlighting. See for example this page: https://community.kde.org/Get_Involved/development/More#Build_Qt6_using_kdesrc-build
Long file content with lots of comments is hard to read when the comments and actual code are the same color.

I currently manually colored the text there (opened in vim with kdesrc-buildrc syntax installed, choosed a good theme (I used "shine", but made comments color a bit more bright), saved with TOhtml command, replaced span attributes class="" with syntax="...").

With that approach, it is hard to edit the wiki. The SyntaxHighlight https://www.mediawiki.org/wiki/Extension:SyntaxHighlight extension will allow to make it automatically.

It uses Pygments (https://pygments.org), and it is said there that it is very easy to create your own languages (for our case it is kdesrc-buildrc). But even if not do this, we can just at least highlight it as bash, and this will significantly easify reading (comments will be different color from the code). 

ADDITIONAL INFORMATION
Discussed in Matrix
Comment 1 Andrew Shark 2023-08-24 15:11:49 UTC
I used syntaxhighlight tag, it works, thanks.