Skip to content

Commit

Permalink
fix: assets URL is missing baseurl in self-hosted mode (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi2233 authored Jun 2, 2022
1 parent 76a1b6a commit 54124d5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
{% endfor %}

<link rel="stylesheet" href="{{ site.data.assets[origin].webfonts }}">
<link rel="stylesheet" href="{{ site.data.assets[origin].webfonts | relative_url }}">

{% endif %}

Expand All @@ -90,25 +90,25 @@
{% endif %}

<!-- Bootstrap -->
<link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap.css }}">
<link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap.css | relative_url}}">

<!-- Font Awesome -->
<link rel="stylesheet" href="{{ site.data.assets[origin].fontawesome.css }}">
<link rel="stylesheet" href="{{ site.data.assets[origin].fontawesome.css | relative_url }}">

<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">

{% if site.toc and page.toc %}
<link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap-toc.css }}">
<link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap-toc.css | relative_url }}">
{% endif %}

{% if page.layout == 'page' or page.layout == 'post' %}
<!-- Manific Popup -->
<link rel="stylesheet" href="{{ site.data.assets[origin].magnific-popup.css }}">
<link rel="stylesheet" href="{{ site.data.assets[origin].magnific-popup.css | relative_url }}">
{% endif %}

<!-- JavaScript -->

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

{% unless site.theme_mode %}
{% include mode-toggle.html %}
Expand Down
8 changes: 4 additions & 4 deletions _includes/js-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% if page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
<!-- pv-report needs countup.js -->
<script async src="{{ site.data.assets[origin].countup.js }}"></script>
<script async src="{{ site.data.assets[origin].countup.js | relative_url }}"></script>
<script defer src="{{ '/assets/js/dist/pvreport.min.js' | relative_url }}"></script>
{% endif %}
{% endif %}
Expand Down Expand Up @@ -79,14 +79,14 @@
}
};
</script>
<script src="{{ site.data.assets[origin].polyfill.js }}"></script>
<script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js }}">
<script src="{{ site.data.assets[origin].polyfill.js | relative_url }}"></script>
<script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js | relative_url }}">
</script>
{% endif %}

<!-- commons -->

<script src="{{ site.data.assets[origin].bootstrap.js }}"></script>
<script src="{{ site.data.assets[origin].bootstrap.js | relative_url }}"></script>

{% if jekyll.environment == 'production' %}
<!-- PWA -->
Expand Down
2 changes: 1 addition & 1 deletion _includes/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mermaid-js loader
-->

<script src="{{ site.data.assets[origin].mermaid.js }}"></script>
<script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>

<script>
$(function() {
Expand Down
2 changes: 1 addition & 1 deletion _includes/search-loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{% capture not_found %}<p class="mt-5">{{ site.data.locales[lang].search.no_results }}</p>{% endcapture %}

<script src="{{ site.data.assets[origin].search.js }}"></script>
<script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>

<script>
SimpleJekyllSearch({
Expand Down
2 changes: 1 addition & 1 deletion _includes/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% if enable_toc %}
<!-- BS-toc.js will be loaded at medium priority -->
<script src="{{ site.data.assets[origin].bootstrap-toc.js }}"></script>
<script src="{{ site.data.assets[origin].bootstrap-toc.js | relative_url }}"></script>

<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
<div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[lang].panel.toc -}}</div>
Expand Down

0 comments on commit 54124d5

Please sign in to comment.