Merge pull request #520 from ZakKemble/fix-script-location-and-url-encode

This commit is contained in:
Cotes 2022-03-03 21:06:48 +08:00 committed by GitHub
commit d2bbcb791f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -87,4 +87,7 @@
<script src="{{ site.data.assets[origin].jquery.js }}"></script>
{% unless site.theme_mode %}
{% include mode-toggle.html %}
{% endunless %}
</head>

View file

@ -6,10 +6,11 @@
<span class="share-label text-muted mr-1">{{ site.data.locales[lang].post.share }}</span>
<span class="share-icons">
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
{% assign url = page.url | absolute_url %}
{% assign title = title | url_encode %}
{% assign url = page.url | absolute_url | url_encode %}
{% for share in site.data.share.platforms %}
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url | escape %}
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
title="{{ share.type }}" target="_blank" rel="noopener" aria-label="{{ share.type }}">
<i class="fa-fw {{ share.icon }}"></i>

View file

@ -19,10 +19,6 @@ layout: compress
{% include head.html %}
{% unless site.theme_mode %}
{% include mode-toggle.html %}
{% endunless %}
<body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
{% include sidebar.html %}