Assuming that you are referring to plain text...
while keeping them as clickable links
First of all you need to establish why a plain text URL is doing something when you click on it, as your new requirement is going to need to interact with that.
(I'm guessing goto-address-mode
is enabled, so I would check that first.)
If you ensure that everything that you want to be compiled is currently compiled, you can let https://github.com/emacscollective/auto-compile manage it from there.