Skip to content

Commit

Permalink
Hopefully fix problems with use of HTTP not HTTPS in URLs
Browse files Browse the repository at this point in the history
Change site.github.url to either site.url or use relative_url filter
  • Loading branch information
mrmanc committed May 20, 2019
1 parent 0d024de commit c986a84
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 33 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec
gem 'github-pages'
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ defaults:
path: ""
values:
image: /assets/images/at-chevron_4096x4096.png
- scope:
path: ""
values:
comments: true
# end jekyll-seo-tag configuration
2 changes: 1 addition & 1 deletion _includes/back_to_home.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div style="float:right;"><a href="{{ site.github.url }}/">< Back to home</a></div>
<div style="float:right;"><a href="{{ site.url }}/">< Back to home</a></div>
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</a>
</li>
</ul>
<p class="text">{{ site.description }} Subscribe <a href="{{ site.github.url }}/feed.xml">via RSS</a></p>
<p class="text">{{ site.description }} Subscribe <a href="{{ "feed.xml" | relative_url }}">via RSS</a></p>
</footer>

<div class="copyright-base">
Expand Down
30 changes: 15 additions & 15 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="{{ site.github.url }}/assets/images/favicons/favicon.png"/>
<link rel="icon" href="{{ site.github.url }}/assets/images/favicons/favicon.png">
<link rel="shortcut icon" href="{{ "/assets/images/favicons/favicon.png" | relative_url }}"/>
<link rel="icon" href="{{ "/assets/images/favicons/favicon.png" | relative_url }}">

<link rel="apple-touch-icon" href="{{ site.github.url }}/assets/images/favicons/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="57x57" href="{{ site.github.url }}/assets/images/favicons/favicon57.png">
<link rel="apple-touch-icon" sizes="72x72" href="{{ site.github.url }}/assets/images/favicons/favicon72.png">
<link rel="apple-touch-icon" sizes="76x76" href="{{ site.github.url }}/assets/images/favicons/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="114x114" href="{{ site.github.url }}/assets/images/favicons/favicon114.png">
<link rel="apple-touch-icon" sizes="120x120" href="{{ site.github.url }}/assets/images/favicons/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="{{ site.github.url }}/assets/images/favicons/touch-icon-ipad-retina.png">
<link rel="apple-touch-icon" href="{{ "/assets/images/favicons/touch-icon-iphone.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="57x57" href="{{ "/assets/images/favicons/favicon57.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "/assets/images/favicons/favicon72.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "/assets/images/favicons/touch-icon-ipad.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "/assets/images/favicons/favicon114.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "/assets/images/favicons/touch-icon-iphone-retina.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "/assets/images/favicons/touch-icon-ipad-retina.png" | relative_url }}">

<meta name="application-name" content="AutoTrader">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-square70x70logo" content="{{ site.github.url }}/assets/images/favicons/msapplication-tiny.png">
<meta name="msapplication-square150x150logo" content="{{ site.github.url }}/assets/images/favicons/msapplication-square.png">
<meta name="msapplication-wide310x150logo" content="{{ site.github.url }}/assets/images/favicons/msapplication-wide.png">
<meta name="msapplication-square310x310logo" content="{{ site.github.url }}/assets/images/favicons/msapplication-large.png">
<meta name="msapplication-square70x70logo" content="{{ "/assets/images/favicons/msapplication-tiny.png" | relative_url }}">
<meta name="msapplication-square150x150logo" content="{{ "/assets/images/favicons/msapplication-square.png" | relative_url }}">
<meta name="msapplication-wide310x150logo" content="{{ "/assets/images/favicons/msapplication-wide.png" | relative_url }}">
<meta name="msapplication-square310x310logo" content="{{ "/assets/images/favicons/msapplication-large.png" | relative_url }}">

<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

<link rel="stylesheet" href="{{ site.github.url }}/assets/css/main.css">
<link rel="stylesheet" href="{{ "assets/css/main.css" | relative_url }}">

{% seo %}

{% if page.typescript-syntax %}
<link rel="stylesheet" href="{{ site.github.url }}/assets/css/typescript-syntax-highlighting.css">
<link rel="stylesheet" href="{{ "/assets/css/typescript-syntax-highlighting.css" | relative_url }}">
{% endif %}
</head>
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="top-header" >
<div class="wrapper">
<a class="site-title at-logo" href="{{ site.github.url }}/" >
<a class="site-title at-logo" href="{{ site.url }}/" >
Auto Trader
</a>
<span>{{ site.title }}</span>
Expand All @@ -30,7 +30,7 @@



<a class="site-title at-logo" href="{{ site.github.url }}/" >
<a class="site-title at-logo" href="{{ site.url }}/" >
Auto Trader
</a>

Expand All @@ -39,7 +39,7 @@

{% for page in site.pages %}
{% if page.title %}
<a class="page-link" href="{{ page.url | prepend: site.github.url }}">{{ page.title }}</a>
<a class="page-link" href="{{ page.url | relative_url }}">{{ page.title }}</a>
{% endif %}
{% endfor %}

Expand Down
4 changes: 2 additions & 2 deletions _includes/social_share.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="social-share">
Share:
<a href="https://twitter.com/intent/tweet?text={{ page.title }}&url={{ site.github.url }}{{ page.url }}&via={{ site.twitter.username }}&related={{ site.twitter.username }}" rel="nofollow" target="_blank" title="Share on Twitter">
<a href="https://twitter.com/intent/tweet?text={{ page.title }}&url={{ page.url | relative_url }}&via={{ site.twitter.username }}&related={{ site.twitter.username }}" rel="nofollow" target="_blank" title="Share on Twitter">
{% include icons/twitter.html %}
</a>
<a href="https://facebook.com/sharer.php?u={{ site.github.url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Facebook">
<a href="https://facebook.com/sharer.php?u={{ page.url | relative_url }}" rel="nofollow" target="_blank" title="Share on Facebook">
{% include icons/facebook.html %}
</a>
</div>
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<!-- "{{ site.github.url }}" -->
<!-- "{{ site.url }}" -->
{% include head.html %}

<body>
Expand Down
8 changes: 4 additions & 4 deletions _layouts/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.github.url }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.github.url }}" rel="self" type="application/rss+xml" />
<link>{{ site.url }}/</link>
<atom:link href="{{ "/feed.xml" | relative_url }}" rel="self" type="application/rss+xml" />
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
Expand All @@ -13,8 +13,8 @@
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.github.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.github.url }}</guid>
<link>{{ post.url | relative_url }}</link>
<guid isPermaLink="true">{{ post.url | relative_url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions _layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1 class="page-heading">{{site.title}}</h1>
{% for post in paginator.posts %}
<li>
<h2>
<a class="post-link" href="{{ site.github.url }}{{ post.url }}">{{ post.title }}</a>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
</h2>
<p>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • {{ post.author }}{% endif %}</span>
Expand All @@ -24,7 +24,7 @@ <h2>
{{ post.excerpt | number_of_words }}
{% endcapture %}
{% if excerpt_words != content_words %}
<p><a class="btn btn-sm btn-primary" href="{{ site.github.url }}{{ post.url }}" role="button">Read more… <i class="fa fa-arrow-circle-right"></i></a>
<p><a class="btn btn-sm btn-primary" href="{{ post.url | relative_url }}" role="button">Read more… <i class="fa fa-arrow-circle-right"></i></a>
</p>
{% endif %}
</li>
Expand All @@ -34,13 +34,13 @@ <h2>
{% if paginator.total_pages != 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ site.github.url }}{{ paginator.previous_page_path }}" class="previous">Previous</a>
<a href="{{ paginator.previous_page_path | relative_url }}" class="previous">Previous</a>
{% else %}
<span class="previous inactive">Previous</span>
{% endif %}
<span class="page_number ">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ site.github.url }}{{ paginator.next_page_path }}" class="next">Next</a>
<a href="{{ paginator.next_page_path | relative_url }}" class="next">Next</a>
{% else %}
<span class="next inactive">Next</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2 id="{{ tag | slugify }}">{{ tag }}</h2>
{% if post.tags contains tag %}
<li>
<h3>
<a href="{{ site.github.url }}{{ post.url }}">
<a href="{{ post.url | relative_url }}">
{{ post.title }}
<br><small>{{ post.date | date_to_string }}—{{ post.author }}</small>
</a>
Expand Down

0 comments on commit c986a84

Please sign in to comment.