Can I do any post-/pre-processing to my markdown/html?

I would like to make all my Headings clickable links, possibly with a thing on the side that copies the link to the user’s clipboard. Is this possible? I think it could be achieved if there was some way to run all the resulting HTML files through some sort of post-processor. (After the templating is over)