Move important head elements to top of the block

The `<meta charset>` tag is expected to be in the first 1024 bytes of an HTML file, so it's common to keep it as the very first item under the `<head>` tag. (See <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta>)

Also moving up other important meta tags which may affect rendering of the page as a whole.
This commit is contained in:
Behnam Esfahbod ❄ 2017-11-14 09:17:20 -08:00 committed by GitHub
parent 86e7ef9568
commit 6c92ccb57b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}"> <html lang="{{ DEFAULT_LANG }}">
<head> <head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page in hidden_pages %}
<meta name="robots" content="noindex, nofollow" />
{% else %}
<meta name="robots" content="{{ ROBOTS }}" />
{% endif %}
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
{% if USE_LESS %} {% if USE_LESS %}
@ -40,16 +50,6 @@
{% include "partial/ga.html" %} {% include "partial/ga.html" %}
{% endif %} {% endif %}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page in hidden_pages %}
<meta name="robots" content="noindex, nofollow" />
{% else %}
<meta name="robots" content="{{ ROBOTS }}" />
{% endif %}
{% if BROWSER_COLOR %} {% if BROWSER_COLOR %}
<!-- Chrome, Firefox OS and Opera --> <!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="{{ BROWSER_COLOR }}"> <meta name="theme-color" content="{{ BROWSER_COLOR }}">