]> granicus.if.org Git - jq/commitdiff
Canonical URL and redirect to https site (fix #908)
authorDavid Tolnay <dtolnay@gmail.com>
Sat, 15 Aug 2015 18:09:03 +0000 (11:09 -0700)
committerDavid Tolnay <dtolnay@gmail.com>
Sat, 15 Aug 2015 19:23:13 +0000 (12:23 -0700)
docs/site.yml
docs/templates/shared/_head.liquid

index b9277337e631445f6768aaae4383cf5cad4d1144..92cdbe4c36813353d986f0c2f468ed37488de999 100644 (file)
@@ -1,6 +1,6 @@
 # The key value pairs found below are available within the templates.
 
-:url: http://stedolan.github.io/jq
+:url: https://stedolan.github.io/jq
 
 # This line is modified by the Makefile. To change the version number,
 # edit the Autoconf version number at the top of configure.ac
index 5e71c7c9948cfbe006959704c025e04f088e2f96..b25c35e756dbedda24684a6f4b5e972e92f061ae 100644 (file)
@@ -1,8 +1,13 @@
   <head>
+    <script>
+      if ((window.location.host == "stedolan.github.io") && (window.location.protocol != "https:"))
+        window.location.protocol = "https";
+    </script>
     <meta charset="utf-8">
     <title>{{headline}}</title>
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <link rel="canonical" href="{{url}}{{permalink | remove:'/index'}}" />
     <link rel="stylesheet" href="{{root}}/bootstrap/css/bootstrap.css" type="text/css">
     <link rel="stylesheet" href="{{root}}/css/base.css" type="text/css">
     <!--[if lt IE 9]>