According to Docpad's list of Plugins you have a few options. I noticed the two listed below with a quick skim. There may be others I missed.
- Highlight.js Plugin
- Pygments Plugin
If you want to customize the way the output looks, I suspect you will need to edit the CSS which either Plugin uses. See the documentation for the specific plugin you choose.
For example, the Highligh.js Plugin docs state that you need to download the stylesheet separately (which would explain why the OP is not getting any styling using that Plugin). Review the provided list and demos and select the style that best fits your desired look.
Download the CSS file and save to the appropriate directory. As the Docpad's docs indicate, that would be at src/render/styles/filename.css
being sure to replace "filename.css" with the name of the file. As the docs state:
Then, to include it in our pages, we'll update the styles Block in our default.html.eco layout to:
<%- @getBlock("styles").add(["/styles/style.css"]).toHTML() %>
Again, be sure to use the actual name of your file.
To make any adjustments to the colors/styling used, you will then need to edit that CSS file. Note that Highlight.js provides a list of class names that you can use for styling hooks. Find the specific class names which match up with the items your want to adjust and find where that class is styled in the CSS file and edit until you are satisfied.
Note that the above assumes you are using the default setup and plugins as explained in the "Getting Started" page of the DocPad docs. YMMV.
If you want to highlight changes, then you will need to create a diff of your changes and then define "diff" as the language. Highlight.js will then use the diff highlighter to highlight the changes. Unfortunately, there is no way to get both the language highlighted and the diff highlighted at the same time. In other words, you can either have the keywords highlighted or you can have the changes highlighted, not both.
Of course, you could always define your own "language" and register it with Highlight.js. But that is beyond the scope of this forum.