Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postprocessing HTML in jekyll

Tags:

jekyll

Is it possible to add a post-processing step (in ruby) to run in Jekyll after it converts markup to HTML?
I'd like to add some html content, and can't see a way to do that in Jekyll files in general (though certain dialects of markup might support it), so I think it would have to be done by operating on the HTML after Jekyll converts it and before it writes it into _site/.

EDIT: Clarified that I'm looking to do this in Ruby and in arbitrary dialects of markup.

like image 430
wonder Avatar asked May 02 '26 00:05

wonder


1 Answers

It looks like I may be able to do this by providing a Liquid filter that postprocess the html content, and changing {{ content }} to {{ content | my_postprocess }} in _layouts/post.html and _layouts/page.html.

like image 160
wonder Avatar answered May 07 '26 18:05

wonder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!