docs icon indicating copy to clipboard operation
docs copied to clipboard

HTML/CSS Validator

Open osterman opened this issue 7 years ago • 2 comments

what

  • Add a HTML/CSS validator to check all docs in public/ for wellformedness

why

  • We have run into a number of pages built by hugo that are invalid

osterman avatar Jun 26 '18 22:06 osterman

So, here is my report about this issue.

Regarding HTML validation: In our case we have generated HTML that in most case has very poor formatting. So many libs recognizes it as non-valid markup (due to bad parser implementation i think). Another problem is that there are not many npm packages for this purpose. I've tried htmllint, html-validate and html-validator. First one looks good at all, but it maintained badly - so it has issue and didn't catch many issues in html. Second one is alse good and fast enough, but had issues with badly-formatted html (recognize it as invalid on tags-closed rule - but all tags are closed ). Last one didn't have option to process directory and validate file be file, and the most reasonable gap is the it uses remote server for validation.

alebabai avatar Jun 29 '18 14:06 alebabai

Okay, let's consider html-tidy at a later date.

osterman avatar Jul 03 '18 07:07 osterman