add a check to regenerate the documentation just once when a file is modified, instead of two