A GitHub Action that validates an HTML file against the HTML 2.0 DTD
(RFC 1866, 1995) — real SGML
validation with OpenSP's onsgmls, using
the DTD, SGML declaration, and Latin-1 entity set vendored from
w3.org.
steps:
- uses: actions/checkout@v4
- uses: lra/validate-html2@v1
with:
file: index.html| Input | Required | Description |
|---|---|---|
file |
yes | Path to the HTML file to validate |
strip |
no | grep -E pattern; matching lines are removed before validation. Useful to allow a deliberate anachronism, e.g. an analytics <script> tag. |
- uses: lra/validate-html2@v1
with:
file: index.html
strip: _vercel/insightsThe action fails if the file is not valid HTML 2.0, with onsgmls errors in
the log. Linux runners only.