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

Use head/body tags in redirection markup #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmbuckley
Copy link

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

@cmbuckley
Copy link
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
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
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
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
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 <[email protected]>
Co-authored-by: Chris Buckley <[email protected]>
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