Reputation: 48330
I want to post syntax highlighted code on my blog but I can't find any online service that would do that for me so I thought I could hook it up using pygments
Anyone knows how to hook it up from an emacs buffer ?
I need to invoke something like these examples but from command line.
Upvotes: 1
Views: 185
Reputation: 2850
I would recommend the use of htmlize in this case. Pygments is nice, but if you have Emacs set up with color themes and have a mode that already knows how to syntax highlight your code, htmlize will leverage that and take give you HTML that looks just like your Emacs buffer.
If you have a light background in your blog, try color-theme-high-contrast
or color-theme-blipp-blopp
. If it is dark, try color-theme-taming-mr-arneson
or color-theme-comidia
. Those are my personal favorites.
Upvotes: 5