Using `site.github.url` to refer to the repository fails to load resources when the GitHub Pages site is accessed via HTTPS, because `site.github.url` is `http` protocol. This modifies loads of CSS and Javascript files to always use `https`.
-<script src="{{ site.github.url }}/assets/js/jquery.min.js"></script>
-<script src="{{ site.github.url }}/assets/js/bootstrap.min.js"></script>
-<script src="{{ site.github.url }}/assets/js/lesson.js"></script>
+<script src="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/js/jquery.min.js"></script>
+<script src="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/js/bootstrap.min.js"></script>
+<script src="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/js/lesson.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="last-modified" content="{{ site.time }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="search-domain" value="{{ site.github.url }}">
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/bootstrap.css" />
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/bootstrap-theme.css" />
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/lesson.css" />
+ <meta name="search-domain" value="{{ site.github.url | replace_first: 'http:', 'https:' }}">
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/bootstrap.css" />
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/bootstrap-theme.css" />
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/lesson.css" />
{% if site.carpentry == "swc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-swc.ico" />
{% endif %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="last-modified" content="{{ site.time }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/bootstrap.css" />
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/bootstrap-theme.css" />
- <link rel="stylesheet" type="text/css" href="{{ site.github.url }}/assets/css/lesson.css" />
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/bootstrap.css" />
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/bootstrap-theme.css" />
+ <link rel="stylesheet" type="text/css" href="{{ site.github.url | replace_first: 'http:', 'https:' }}/assets/css/lesson.css" />
{% if site.carpentry == "swc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-swc.ico" />
{% endif %}