adds hook to re-compile document after iron-router