I don't think grunt is the way to go for this, what you really want to do is hook in to the rendering process that docpad does for each document. Typically, grunt is used to run a task at the end of the generation to do something that docpad doesn't do out of the box.
To intercept docpad's rendering process you probably want to handle the docpad render event which you define in the events section of the docpad.coffee file.
Assuming you want to minify your html you might do something like this (more or less lifted from the docpad documentation):
render: (opts) ->
# Prepare
{inExtension,outExtension,templateData,file,content} = opts
docpad = @docpad
# Render if applicable
if outExtension in ['html']
opts.content = minifyFunction(content)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…