fvwmorg / fvwmorg.github.io

FVWM website
GNU General Public License v2.0
6 stars 7 forks source link

Add syntax highlighting plugin using Pygments. #36

Closed somiaj closed 5 months ago

somiaj commented 5 months ago

This adds my old Pygments lexer before Jekyll moved to rouge. This is done by using a Jekyll plugin to call the pygmentize binary to convert the code using the lexer _FvwmLexer.py included in the source. Because the plugin is run for each block of code, a full python environment is loaded each time pygmentize is called, which increases the build times significantly (30seconds on my machine). By default the plugin will not run pygmentize, so this feature needs to be enabled by running:

jekyll build --config _config.yml,_config-fvwm2rc.yml

Since the site is built rarely, implementing a faster method is not work any additional complexity in using the custom lexer. Also since this is a custom _plugin, this will not work on github pages directly.

Merging now since it is disabled by default and can be used locally. Will add build infrastructure in a future PR.