There are many services that embed source code and display it, but depending on your blog it may not be supported. In addition, it does not correspond to the syntax highlight display of the code in the first place, and the code display sometimes becomes subtle.
Let's use src2png in such a case. Although it is an image, it displays the source code beautifully.
How to use src2png
It's easy to use, just pass the source code file to the src2png command.
- $ src2png SOURCE_FILE
Then it will generate beautiful images.
src2png sets up an HTTP server for development named Poi, and highlights the source code there. And it is a mechanism to take a screenshot using a headless browser. Changing fonts and changing hue can be controlled with style sheets.
src2png is open source software (MIT License) made by node / JavaScript.
No comments:
Post a Comment