Add new config var generatePreview to togle preview generation
Update test for HTML preview correctness
Add test to verify preview is not generated