daviddarnes / alembic

⚗️ A Jekyll boilerplate theme designed to be a starting point for any Jekyll website
https://alembic.darn.es
MIT License
767 stars 903 forks source link

[Fix] Add meta charset utf8 to default html #159

Closed johannes-jansson closed 4 years ago

johannes-jansson commented 4 years ago

I had an issue with displaying nordic special characters on my alembic site. Turns out some browsers don't default to utf8. utf8 seems like a sane default to me, so I decided to add it and everything works great.

Fixes: #151

johannes-jansson commented 4 years ago

Let me know if you want me to publish with/without the fix on S3 as a form of reproduction 🙂

johannes-jansson commented 4 years ago

With <meta charset="utf-8">: http://lund.apologia.se.s3-website-eu-west-1.amazonaws.com/ Without <meta charset="utf-8">: http://test.lund.apologia.se.s3-website.eu-north-1.amazonaws.com/ (It's the last element in the <head> tag, possible to inspect)

ao5357 commented 4 years ago

@johannes-jansson Not to be pedantic, but the meta charset declaration should be the first meta tag in the head (as it is in your PR), since it's render-blocking. In order to adequately test your helpfully-added AWS pages (in Internet Explorer, non-Chromium Edge, etc.) it may only be a true facsimile of the PR if the charset is the first in the head rather than last.

daviddarnes commented 4 years ago

@johannes-jansson thanks for adding this, gonna merge it as it's clearly needed as part of the core theme functionality 👍

@ao5357 I see where you're coming from, but I'm more concerned with the need of it rather than exact usage 😊

johannes-jansson commented 3 years ago

Thanks @ao5357 , that does make sense 👌