Adds conditional for file extension when generating navigation links