Skip to content

Use head/body tags in redirection markup#233

Open
cmbuckley wants to merge 1 commit into
jekyll:masterfrom
cmbuckley:valid-html
Open

Use head/body tags in redirection markup#233
cmbuckley wants to merge 1 commit into
jekyll:masterfrom
cmbuckley:valid-html

Conversation

@cmbuckley

Copy link
Copy Markdown

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

@cmbuckley

Copy link
Copy Markdown
Author

Rebased off latest master

@ashmaroli ashmaroli changed the title Use valid HTML Use valid HTML in redirection markup Aug 20, 2021
@ashmaroli

Copy link
Copy Markdown
Member

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

@cmbuckley cmbuckley changed the title Use valid HTML in redirection markup Use head/body tags in redirection markup Aug 22, 2021
@cmbuckley

Copy link
Copy Markdown
Author

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.

@ashmaroli

Copy link
Copy Markdown
Member

@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?

@cmbuckley

Copy link
Copy Markdown
Author

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.

Young-Lord pushed a commit to Young-Lord/jekyll-redirect-from that referenced this pull request Nov 1, 2023
Co-authored-by: Stuart <stuart.wheaton@jhuapl.edu>
Co-authored-by: Chris Buckley <chris@cmbuckley.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants