This folder has two Dart CLI applications that generate and validate HTML files. When we have to make some changes to a page, we do the following:
- Open the
html_generator
project and make changes to the HTML file(s). - When ready, we execute
dart run
from the root of thehtml_generator
project to create the new HTML pages inside thegenerated/
folder. - Replace the "old" HTML files in the
public/
folder with the newly generated ones. - Open the
html_validator
project and executedart run
to validate the HTML files in thepublic
folder.
The validator tool uses the official W3C API to validate the HTML files within the public
folder. This is useful to ensure that the production server does not hand out malformed pages. For example:
$ dart run
HTML validator started...
> buy.html: Valid :)
> index.html: Valid :)
> overview.html: Valid :)
Done!
This is what the html_validator
program outputs when we run it to evaluate the health of the HTML pages in the public
folder.