Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting for invalid frontmatter/incorrect inline HTML #26

Open
jeffposnick opened this issue Mar 1, 2022 · 0 comments
Open

Linting for invalid frontmatter/incorrect inline HTML #26

jeffposnick opened this issue Mar 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jeffposnick
Copy link
Contributor

There are a number of posts on web.dev that have either errors in their frontmatter or invalid inline HTML within their Markdown, and the resulting HTML is syntacticly invalid. This results in the following errors when trying to minify the HTML during a production build, and could lead to incorrect rendering of the final page, depending on how severe the error is.

We should add some linting (ideally here, so we can share it with d.c.c.) to catch syntax errors in the final HTML output, and warn when that happens.

The current output for web.dev when there's a failure looks like

Could not minify html for dist/i18n/de/samesite-cookies-explained/index.html
Could not minify html for dist/bfcache/index.html
Could not minify html for dist/goibibo/index.html
Could not minify html for dist/love-your-cache/index.html
Could not minify html for dist/more-variable-font-options-in-chromium-83/index.html
Could not minify html for dist/samesite-cookies-explained/index.html
Could not minify html for dist/speed-tooling-evolutions-cds-2019/index.html
Could not minify html for dist/tokopedia/index.html
Could not minify html for dist/priority-hints/index.html
Could not minify html for dist/i18n/fr/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/es/goibibo/index.html
Could not minify html for dist/i18n/es/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/ja/optimize-lcp/index.html
Could not minify html for dist/i18n/ja/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/ko/bluetooth/index.html
Could not minify html for dist/i18n/ko/hid/index.html
Could not minify html for dist/i18n/ko/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/ko/usb/index.html
Could not minify html for dist/i18n/ko/web-share/index.html
Could not minify html for dist/i18n/pt/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/zh/samesite-cookies-explained/index.html
Could not minify html for dist/i18n/ru/samesite-cookies-explained/index.html
@jeffposnick jeffposnick added the enhancement New feature or request label Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant