[Docs] Force using current protocol scheme for resources and links
If the docs is accessed with https, change all links to be https as well.
This commit is contained in:
1 parent
8a2dcc946b
commit
859b8d336e
7 files changed
+21
-11
No files matched your search
@@ -1,5 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% assign protocol_scheme = page.url | absolute_url | truncate: 5, "" %}
|
||||
{%- capture site_url -%}
|
||||
{%- if protocol_scheme == "https" -%}
|
||||
<!-- This is a hack to force using HTTPS... -->
|
||||
<!-- The URL of the docs should be changed in the repo settings instead -->
|
||||
{{ site.github.url | replace: "http", "https" }}
|
||||
{%- else -%}
|
||||
{{ site.github.url }}
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
|
||||
Reference in new issue
Block a user