-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Fixes: Some assets is 404 when baseurl isn't empty and assets is 'self_host' #590
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reporting this bug. However, in your patch, cross-domain URLs will also be filtered by relative_url
, which is not necessary and will affect the readability of the code. So maybe a better way is to handle baseurl
in _data/assets/self_host.yml
It may affect readability, but this |
Maybe you don't get my point, of course we need |
Yes, I didn't understand what you were trying to du, because I just tried it and ---
---
# fonts
webfonts: {{ "/assets/lib/fonts/main.css" | relative_url }} |
Well, I didn't notice that Jekyll doesn't support parsing Liquid filters in data files, so adding baseurl in the HTML file is the only option left, will merge this PR. |
_includes/js-selector.html
Outdated
| append: ',' | append: site.data.assets[origin].dayjs.js.locale | ||
| replace: ':LOCALE', locale | ||
| append: ',' | append: site.data.assets[origin].dayjs.js.relativeTime | ||
| append: ',' | append: site.data.assets[origin].dayjs.js.localizedFormat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo these indents
_includes/js-selector.html
Outdated
| append: ',' | append: site.data.assets[origin].lozad.js | ||
| append: ',' | append: site.data.assets[origin].clipboard.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And undo these, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And undo these, too
done. 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can, squash all your commits, then rebase to the latest commit on the master branch.
_includes/head.html
Outdated
{% endif %} | ||
|
||
<!-- JavaScript --> | ||
|
||
<script src="{{ site.data.assets[origin].jquery.js }}"></script> | ||
<script src="{{ site.data.assets[origin].jquery.js | relative_url }}"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove one space before |
Description
Fixes: Some assets is 404 when baseurl isn't empty and assets is 'self_host'
Type of change
How has this been tested
bash ./tools/deploy.sh --dry-run
(at the root of the project) locally and passedTest Configuration
Checklist