jekyll-redirect-from icon indicating copy to clipboard operation
jekyll-redirect-from copied to clipboard

Use head/body tags in redirection markup

Open cmbuckley opened this issue 4 years ago • 5 comments

Running a Netlify plugin using html-validate fires warnings against redirect pages.

cmbuckley avatar Feb 17 '21 19:02 cmbuckley

Rebased off latest master

cmbuckley avatar Jun 24 '21 20:06 cmbuckley

Spec-wise the <head>, <body> tags can be omitted without invalidating the document.

ashmaroli avatar Aug 22 '21 10:08 ashmaroli

Updated the PR name to reflect that! You’re right that they can be omitted according to the spec; html-validate is being more strict than the spec here. Also, interestingly, the Google style guide recommends their omission.

cmbuckley avatar Aug 22 '21 11:08 cmbuckley

@cmbuckley Yep, I saw the Google recommendation as well. Thanks for posting a link here. In the light of the new info, is it necessary to proceed with the proposal?

Also, is html-validate parsing the document correctly as HTML5?

ashmaroli avatar Aug 22 '21 12:08 ashmaroli

html-validate only validates HTML5 documents, but they do state strictness as a design choice.

I can see either side here; the PR isn’t strictly necessary and the validation rules can be set to warn-only, but I would struggle to consider this an “optimisation” and it would be nice to keep the validator rules for other parts of the content model. I haven’t found a nice way to exclude specific files from the validator.

cmbuckley avatar Aug 22 '21 13:08 cmbuckley