-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Replace jsDelivr w/ UNPKG #3234
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
base: master
Are you sure you want to change the base?
Conversation
UNPKG was down again from |
@@ -7,7 +7,7 @@ tag = ["posts", "announcements"] | |||
|
|||
## Kutty 0.0.1 Release | |||
|
|||
I'm pleased to announce the [0.0.1 release](https://unpkg.com/browse/kutty.org@0.0.1/) of kutty, the successor | |||
I'm pleased to announce the [0.0.1 release](https://cdn.jsdelivr.net/npm/browse/kutty.org@0.0.1/) of kutty, the successor |
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.
This is erroring: Couldn't find the requested file /kutty.org@0.0.1/ in browse.
Actually, even unpkg is not finding it now. I suggest that we just don't touch the old release notes.
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.
OK, let me drop those changes in the changelog.
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.
@yawaramin The PR has been rebased and updated.
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.
LGTM. As a future improvement, I wonder if Zola has a way to factor out common blocks of Markdown and then include them. Could save a lot of duplication.
EDIT: duplication can be factored out with shortcodes, eg:
<!-- www/templates/shortcodes/htmx_js.html -->
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.js"
integrity="sha384-oeUn82QNXPuVkGCkcrInrS1twIxKhkZiFfr2TdiuObZ3n3yIeMiqcRzkIcguaof1" crossorigin="anonymous"></script>
<!-- www/templates/shortcodes/htmx_min_js.html -->
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"
integrity="sha384-HGfztofotfshcF7+8n44JQL2oJmowVChPTg48S+jvZoztPfvwD79OC/LTtG6dMp+" crossorigin="anonymous"></script>
Usage:
<!-- www/content/docs.md -->
### Via A CDN (e.g. jsDelivr)
The fastest way to get going with htmx is to load it via a CDN. You can simply add this to
your head tag and get going:
```html
{{ htmx_min_js() }}
An unminified version is also available as well:
{{ htmx_js() }}
It looks like it belongs to a future PR, though. If you like, I can work on this once the PR is merged. |
Agreed! |
Just a thought...PR review might take a while. Within that time you may be able to just switch over to shortcodes for all the htmx script tags in the website code samples. Might make it a more compelling PR overall. |
Sure, lemme see if I can do this. |
Description
UNPKG has not been actively maintained and
has been down sincewas down from Mar 15, 2025, 2:00 AM and down for 18 hours (unpkg/unpkg#412). Migrating to jsDelivr means a more stable and reliant service.Mar 15, 2025
The PR replaces UNPKG usage with jsDelivr in the following places:
The unpkg.com usage inside the test cases are not replaced/modified.
Testing
Checklist
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded