Generation html page: done, adjust the script to handle directory.