From d91c8820f957b9dfc6f4805fcd080dd6e0edcddd Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Wed, 2 Jul 2025 20:58:44 -0400 Subject: [PATCH 01/16] Remove extra "2" from unminified v2.0.6 SRI hash (#3362) --- www/content/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/content/docs.md b/www/content/docs.md index f64f4d5f..8ec3d183 100644 --- a/www/content/docs.md +++ b/www/content/docs.md @@ -129,7 +129,7 @@ your head tag and get going: An unminified version is also available as well: ```html - + ``` While the CDN approach is extremely simple, you may want to consider From 9fb3c0e492c8f44d0d997ef63a6276af18c65d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 15 Jul 2025 01:38:39 +0200 Subject: [PATCH 02/16] Fix variable names (#3344) * Fix variable names * Fix one more variable name --- TESTING.md | 2 +- editors/jetbrains/htmx.web-types.json | 6 +++--- test/attributes/hx-swap-oob.js | 2 +- www/content/_index.md | 2 +- www/content/events.md | 6 +++--- www/static/test/attributes/hx-swap-oob.js | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TESTING.md b/TESTING.md index df00be3c..7edb8e53 100644 --- a/TESTING.md +++ b/TESTING.md @@ -10,7 +10,7 @@ This guide outlines how to test htmx, focusing on running tests headlessly or in npm install npm run test ``` -During test runs it will auto install playwrite +During test runs it will auto install playwright ## Running All Tests diff --git a/editors/jetbrains/htmx.web-types.json b/editors/jetbrains/htmx.web-types.json index 81a04442..88eb5da9 100644 --- a/editors/jetbrains/htmx.web-types.json +++ b/editors/jetbrains/htmx.web-types.json @@ -431,12 +431,12 @@ }, { "name": "historyCacheHit", - "description": "This event is triggered when a cache hit occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also override the details of the history restoration request in this event if required\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.item.content` - the content of the cache that will be swapped in\n* `detail.item.title` - the page title to update from the cache\n* `detail.path` - the path and query of the page being restored\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache hit occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also override the details of the history restoration request in this event if required\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.item.content` - the content of the cache that will be swapped in\n* `detail.item.title` - the page title to update from the cache\n* `detail.path` - the path and query of the page being restored\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheHit" }, { "name": "historyCacheMiss", - "description": "This event is triggered when a cache miss occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also modify the xhr request or other details before it makes the the request to restore history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration\n* `detail.path` - the path and query of the page being restored\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache miss occurs when restoring history\n\nYou can prevent the history restoration via `preventDefault()` to allow alternative restore handling.\nYou can also modify the xhr request or other details before it makes the the request to restore history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration\n* `detail.path` - the path and query of the page being restored\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheMiss" }, { @@ -446,7 +446,7 @@ }, { "name": "historyCacheMissLoad", - "description": "This event is triggered when a cache miss occurs and a response has been retrieved successfully from the server\nfor the content to restore\n\nYou can modify the details before it makes the swap to restore the history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest`\n* `detail.path` - the path and query of the page being restored\n* `detail.response` - the response text that will be swapped in\n* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", + "description": "This event is triggered when a cache miss occurs and a response has been retrieved successfully from the server\nfor the content to restore\n\nYou can modify the details before it makes the swap to restore the history\n\n##### Details\n\n* `detail.historyElt` - the history element or body that will get replaced\n* `detail.xhr` - the `XMLHttpRequest`\n* `detail.path` - the path and query of the page being restored\n* `detail.response` - the response text that will be swapped in\n* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML'\n\n", "doc-url": "https://htmx.org/events/#htmx:historyCacheMissLoad" }, { diff --git a/test/attributes/hx-swap-oob.js b/test/attributes/hx-swap-oob.js index 875c4d45..4acf5fe8 100644 --- a/test/attributes/hx-swap-oob.js +++ b/test/attributes/hx-swap-oob.js @@ -349,7 +349,7 @@ describe('hx-swap-oob attribute', function() { } it.skip('triggers htmx:oobErrorNoTarget when no targets found', function(done) { - // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.lenght) + // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.length) this.server.respondWith('GET', '/test', "Clicked
Swapped
") var div = make('
click me
') diff --git a/www/content/_index.md b/www/content/_index.md index 020f2897..2668946d 100644 --- a/www/content/_index.md +++ b/www/content/_index.md @@ -258,7 +258,7 @@ Thank you to all our generous Tracebit Cloud Canaries - Tracebit Cloud Canaries + Tracebit Cloud Canaries
diff --git a/www/content/events.md b/www/content/events.md index 47aa460f..0c3657e4 100644 --- a/www/content/events.md +++ b/www/content/events.md @@ -275,7 +275,7 @@ You can also override the details of the history restoration request in this eve * `detail.item.content` - the content of the cache that will be swapped in * `detail.item.title` - the page title to update from the cache * `detail.path` - the path and query of the page being restored -* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' +* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' ### Event - `htmx:historyCacheMiss` {#htmx:historyCacheMiss} @@ -289,7 +289,7 @@ You can also modify the xhr request or other details before it makes the the req * `detail.historyElt` - the history element or body that will get replaced * `detail.xhr` - the `XMLHttpRequest` that will retrieve the remote content for restoration * `detail.path` - the path and query of the page being restored -* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' +* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' ### Event - `htmx:historyCacheMissLoadError` {#htmx:historyCacheMissLoadError} @@ -314,7 +314,7 @@ You can modify the details before it makes the swap to restore the history * `detail.xhr` - the `XMLHttpRequest` * `detail.path` - the path and query of the page being restored * `detail.response` - the response text that will be swapped in -* `detial.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' +* `detail.swapSpec` - the swapSpec to be used containing the defatul swapStyle='innerHTML' ### Event - `htmx:historyRestore` {#htmx:historyRestore} diff --git a/www/static/test/attributes/hx-swap-oob.js b/www/static/test/attributes/hx-swap-oob.js index 875c4d45..4acf5fe8 100644 --- a/www/static/test/attributes/hx-swap-oob.js +++ b/www/static/test/attributes/hx-swap-oob.js @@ -349,7 +349,7 @@ describe('hx-swap-oob attribute', function() { } it.skip('triggers htmx:oobErrorNoTarget when no targets found', function(done) { - // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.lenght) + // this test fails right now because when targets not found it returns an empty array which makes it miss the event as it should be if (targets.length) this.server.respondWith('GET', '/test', "Clicked
Swapped
") var div = make('
click me
') From 9a686ea2dec9d39fe6b613d0c5c0392cef0f4a60 Mon Sep 17 00:00:00 2001 From: Thomas Ricci <1tomricci@gmail.com> Date: Mon, 14 Jul 2025 20:12:10 -0400 Subject: [PATCH 03/16] Add Thomas Ricci's website to webring (#2231) Add a HTMX CEO's website It seems like personal sites aren't allowed as per #2186, however it was closed because it was "Not exactly an htmx showcase." so I'm not exactly sure if it's that personal sites aren't allowed, or it's that the site didn't showcase HTMX. I'd argue my site is webring-worthy because it relies nearly completely on HTMX and hyperscript, shows that HTMX and hyperscript can create very [fast](https://pagespeed.web.dev/analysis/https-thomasricci-dev/6tey5ptzsx?form_factor=desktop) websites, and has had (some) popularity w/ [HTMX on twitter](https://twitter.com/RudRecciah/status/1749007532734235134). I'd love for it to be added, but if that's not an option that's okay. Co-authored-by: 1cg <469183+1cg@users.noreply.github.com> --- www/content/webring.md | 1 + 1 file changed, 1 insertion(+) diff --git a/www/content/webring.md b/www/content/webring.md index b5e55578..bd05b7d7 100644 --- a/www/content/webring.md +++ b/www/content/webring.md @@ -107,6 +107,7 @@ title = "htmx webring" XRSSA simple RSS reader inspired by Google Reader OpenUnitedA Digital Talent match-making platform GophemeralShare secrets securely! + thomasricci.devSuper fast portfolio website Signup CasaSimple, convenient sign-up forms. RecipyaA clean, simple and powerful recipe manager your whole family can enjoy. StatusnookEffortlessly deploy a status page and start monitoring endpoints in minutes. From 91f44725489592970147bdde8a862dd0db62504c Mon Sep 17 00:00:00 2001 From: flamendless Date: Tue, 15 Jul 2025 08:13:12 +0800 Subject: [PATCH 04/16] Fix typo (#3371) --- www/content/extensions/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/content/extensions/_index.md b/www/content/extensions/_index.md index 2b5ae63e..8ec49a3a 100644 --- a/www/content/extensions/_index.md +++ b/www/content/extensions/_index.md @@ -116,7 +116,7 @@ htmx extensions are split into two categories: {% markdown() %} [restored](https://github.com/bigskysoftware/htmx-extensions/blob/main/src/restored/README.md) {% end %} - {% markdown() %} Triggers an event whenever a back button even is detected while using `hx-boost` {% end %} + {% markdown() %} Triggers an event whenever a back button event is detected while using `hx-boost` {% end %} {% markdown() %} [safe-nonce](https://github.com/MichaelWest22/htmx-extensions/blob/main/src/safe-nonce/README.md) {% end %} From bb4d877330dc5763676df962ea6496e0c7b0f8e9 Mon Sep 17 00:00:00 2001 From: Marius Gundersen Date: Tue, 15 Jul 2025 02:13:39 +0200 Subject: [PATCH 05/16] Added extension (#3364) Added link to htmx-json extension https://github.com/mariusGundersen/htmx-json --- www/content/extensions/_index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/content/extensions/_index.md b/www/content/extensions/_index.md index 8ec49a3a..bdb3effa 100644 --- a/www/content/extensions/_index.md +++ b/www/content/extensions/_index.md @@ -149,6 +149,10 @@ htmx extensions are split into two categories: {% markdown() %} [json-enc-custom](https://github.com/Emtyloc/json-enc-custom/blob/main/README.md) {% end %} {% markdown() %} This extension works similarly to json-enc but allows for very complex structures, such as embedding JSON objects, lists, or handling indexes, just by using the name attribute. {% end %} + + {% markdown() %} [htmx-json](https://github.com/mariusGundersen/htmx-json) {% end %} + {% markdown() %} Support JSON response by transforming the html directly. This is a slightly different appreach than client-side-templates. {% end %} + Integrations From 85e499d17499fea82c6cfc157e5371b2639463cc Mon Sep 17 00:00:00 2001 From: Dave Lewis Date: Tue, 15 Jul 2025 01:13:52 +0100 Subject: [PATCH 06/16] Update Rust server examples with actix-htmx (#3359) Update Rust server examples Add link to actix-htmx --- www/content/server-examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/www/content/server-examples.md b/www/content/server-examples.md index 4effd70b..9b698f35 100644 --- a/www/content/server-examples.md +++ b/www/content/server-examples.md @@ -138,6 +138,7 @@ These examples may make it a bit easier to get started using htmx with your plat ## Rust - +- ## Scala From 9c5a646395053fea5e09090c830de270c89dd58b Mon Sep 17 00:00:00 2001 From: Simon Hartley <170740+scrhartley@users.noreply.github.com> Date: Tue, 15 Jul 2025 01:14:36 +0100 Subject: [PATCH 07/16] Remove redundant script tags (#3358) * Remove redundant script tags * Remove redundant script tags --------- Co-authored-by: scrhartley --- www/content/examples/modal-custom.md | 2 -- www/content/examples/modal-uikit.md | 1 - www/content/examples/tabs-javascript.md | 1 - 3 files changed, 4 deletions(-) diff --git a/www/content/examples/modal-custom.md b/www/content/examples/modal-custom.md index 7cd71259..c45ffa21 100644 --- a/www/content/examples/modal-custom.md +++ b/www/content/examples/modal-custom.md @@ -132,8 +132,6 @@ example. } ``` - -