Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: assets 404 when baseurl isn't empty and assets is 'self_host' #591

Merged
merged 1 commit into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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