Skip to content

Commit d2bbcb7

Browse files
authored
Merge pull request #520 from ZakKemble/fix-script-location-and-url-encode
2 parents 5d85ccb + 4c1c8d8 commit d2bbcb7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

_includes/head.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,7 @@
8787

8888
<script src="{{ site.data.assets[origin].jquery.js }}"></script>
8989

90+
{% unless site.theme_mode %}
91+
{% include mode-toggle.html %}
92+
{% endunless %}
9093
</head>

_includes/post-sharing.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
<span class="share-label text-muted mr-1">{{ site.data.locales[lang].post.share }}</span>
77
<span class="share-icons">
88
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
9-
{% assign url = page.url | absolute_url %}
9+
{% assign title = title | url_encode %}
10+
{% assign url = page.url | absolute_url | url_encode %}
1011

1112
{% for share in site.data.share.platforms %}
12-
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url | escape %}
13+
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
1314
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
1415
title="{{ share.type }}" target="_blank" rel="noopener" aria-label="{{ share.type }}">
1516
<i class="fa-fw {{ share.icon }}"></i>

_layouts/default.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919

2020
{% include head.html %}
2121

22-
{% unless site.theme_mode %}
23-
{% include mode-toggle.html %}
24-
{% endunless %}
25-
2622
<body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
2723

2824
{% include sidebar.html %}

0 commit comments

Comments
 (0)