jpescador / hugo-future-imperfect

A ported theme with some extras for the Hugo static website engine
MIT License
310 stars 228 forks source link

Character set validation on W3C validator #150

Open robvadai opened 5 years ago

robvadai commented 5 years ago

I've got a site published on the web, generated by Hugo.

W3C HTML validation fails because the character set is not set early enough on the generated web page.

Expected Behavior

W3C HTML validation should pass with no errors or warnings.

Current Behavior

It fails because the character set is not set early enough on the generated web page.

Possible Solution

  1. Move the <meta charset="utf-8" /> tag right after the <head> tag
  2. Remove trailing / as it is not needed in HTML5

Steps to Reproduce or Template with Error (for bugs)

https://validator.w3.org/nu/?doc=http%3A%2F%2Fthinking.segence.com%2Fblog%2Fhow-to-make-sense-of-social-media%2F

Context

I've got a site published and I expect no validation errors in order to make the site easily to scrape for web crawlers.

Your Environment

Tested in Chrome

Hugo Version:

Hugo Static Site Generator v0.49.2 darwin/amd64 BuildDate: 2018-10-11T09:48:43Z

Browser:

Chrome Version 69.0.3497.100 (Official Build) (64-bit)

Desktop or Mobile:

Mac OS High Sierra version 10.13.6