Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	www/content/docs.md
  • Loading branch information
1cg committed Jul 14, 2023
2 parents 05a1f8c + 39ffb3a commit 2edb023
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 51 deletions.
4 changes: 2 additions & 2 deletions www/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ insert_anchor_links = "left"
</div>

<div style="border: 1px solid lightgrey; margin:24px;padding:12px;border-radius: 8px; background-color: whitesmoke; filter: drop-shadow(3px 3px darkgray)">
<b>NEWS:</b> We are excited to <a href="/posts/2023-06-06-htmx-github-accelerator/">announce</a> that htmx has been accepted into the first class of the <a href="https://accelerator.github.com/">Github Open Source Accelerator!</a>
<b>NEWS:</b> We are excited to <a href="/posts/2023-06-06-htmx-github-accelerator/">announce</a> that htmx has been accepted into the first class of the <a href="https://accelerator.github.com/">GitHub Open Source Accelerator!</a>
</div>

<h2>introduction</h2>
Expand Down Expand Up @@ -54,7 +54,7 @@ Read the [docs introduction](@/docs.md#introduction) for a more in-depth... intr
<h2>sponsors <iframe src="https://github.com/sponsors/bigskysoftware/button" title="Sponsor htmx" height="32" width="114" style="border: 1px solid gray; border-radius: 12px; float:right"></iframe></h2>


htmx development can be supported via [Github Sponsors](https://github.com/sponsors/bigskysoftware?o=esb)
htmx development can be supported via [GitHub Sponsors](https://github.com/sponsors/bigskysoftware?o=esb)


Thank you to all our generous <a href="https://github.com/sponsors/bigskysoftware?o=esb">supporters</a>, including:
Expand Down
2 changes: 1 addition & 1 deletion www/content/attributes/hx-sse.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ data: <div>Content to swap into your HTML page.</div>

### Test SSE Server

Htmx includes an SSE test server with many more examples of how to use Server Sent Events. Download the htmx source code from github and navigate to /test/servers/sse to experiment.
Htmx includes an SSE test server with many more examples of how to use Server Sent Events. Download the htmx source code from GitHub and navigate to /test/servers/sse to experiment.

## Notes

Expand Down
4 changes: 2 additions & 2 deletions www/content/attributes/hx-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ If you want to add a filter to polling, it should be added *after* the poll decl

### Multiple Triggers

Multiple triggers can be provided, seprarated by commas. Each trigger gets its own options.
Multiple triggers can be provided, separated by commas. Each trigger gets its own options.
```html
<div hx-get="/news" hx-trigger="load, click delay:1s"></div>
```
This example will load `/news` immediate on the page load, and then again with a delay of one second after each click.
This example will load `/news` immediately on page load, and then again with a delay of one second after each click.

### Via JavaScript

Expand Down
2 changes: 1 addition & 1 deletion www/content/attributes/hx-ws.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Own implementations can be provided by setting `htmx.config.wsReconnectDelay` to

### Test Web Sockets Server

Htmx includes a WebSockets test server with many more examples of how to use Server Sent Events. Download the htmx source code from github and navigate to /test/servers/ws to experiment.
Htmx includes a WebSockets test server with many more examples of how to use Server Sent Events. Download the htmx source code from GitHub and navigate to /test/servers/ws to experiment.

## Notes

Expand Down
6 changes: 3 additions & 3 deletions www/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,9 @@ htmx supports some htmx-specific response headers:

For more on the `HX-Trigger` headers, see [`HX-Trigger` Response Headers](@/headers/hx-trigger.md).

Submitting a form via htmx has the benefit, that the [Post/Redirect/Get Pattern](https://en.wikipedia.org/wiki/Post/Redirect/Get) is not needed
any more. After successful processing a POST request on the server, you don't need to return a [HTTP 302 (Redirect)](https://en.wikipedia.org/wiki/HTTP_302). You can directly return the new HTML fragment.

Submitting a form via htmx has the benefit of no longer needing the [Post/Redirect/Get Pattern](https://en.wikipedia.org/wiki/Post/Redirect/Get).
After successfully processing a POST request on the server, you don't need to return a [HTTP 302 (Redirect)](https://en.wikipedia.org/wiki/HTTP_302). You can directly return the new HTML fragment.
### Request Order of Operations {#request-operations}

The order of operations in a htmx request are:
Expand Down
46 changes: 24 additions & 22 deletions www/content/essays/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,39 @@ title = "Essays"
insert_anchor_links = "left"
+++

* [Hypermedia Friendly Scripting](@/essays/hypermedia-friendly-scripting.md)
### Hypermedia and REST
* [HATEOAS](@/essays/hateoas.md)
* [How Did REST Come To Mean The Opposite of REST?](@/essays/how-did-rest-come-to-mean-the-opposite-of-rest.md)
* [Two Approaches To Decoupling](@/essays/two-approaches-to-decoupling.md)
* [Hypermedia APIs vs. Data APIs](@/essays/hypermedia-apis-vs-data-apis.md)
* [Splitting Your Data & Application APIs: Going Further](@/essays/splitting-your-apis.md)
* [Hypermedia Clients](@/essays/hypermedia-clients.md)
* [HATEOAS Is For Humans](https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.html)
* [Rescuing REST From the API Winter](https://intercoolerjs.org/2016/01/18/rescuing-rest.html)
* [Taking HTML Seriously](https://intercoolerjs.org/2020/01/14/taking-html-seriously)
* [REST Copypasta](@/essays/rest-copypasta.md)

### Why Hypermedia? Why Multi-Page Applications?
* [Hypermedia On Whatever you'd Like (HOWL)](@/essays/hypermedia-on-whatever-youd-like.md)
* [A Response To "Have SPAs Ruined The Web"](@/essays/a-response-to-rich-harris.md)
* [When To Use Hypermedia?](@/essays/when-to-use-hypermedia.md)
* [The API Churn/Security Trade-off](https://intercoolerjs.org/2016/02/17/api-churn-vs-security.html)
* [SPA Alternative](@/essays/spa-alternative.md)

### Building Hypermedia Applications
* [A Real World React to htmx Port](@/essays/a-real-world-react-to-htmx-port.md)
* [How Did REST Come To Mean The Opposite of REST?](@/essays/how-did-rest-come-to-mean-the-opposite-of-rest.md)
* [Hypermedia-Driven Applications (HDAs)](@/essays/hypermedia-driven-applications.md)
* [HATEOAS](@/essays/hateoas.md)
* [Hypermedia Clients](@/essays/hypermedia-clients.md)
* [Locality of Behavior (LoB)](@/essays/locality-of-behaviour.md)
* [Splitting Your Data & Application APIs: Going Further](@/essays/splitting-your-apis.md)
* [Hypermedia APIs vs. Data APIs](@/essays/hypermedia-apis-vs-data-apis.md)
* [Complexity Budget](@/essays/complexity-budget.md)
* [SPA Alternative](@/essays/spa-alternative.md)
* [Two Approaches To Decoupling](@/essays/two-approaches-to-decoupling.md)
* [A Response To "Have SPAs Ruined The Web"](@/essays/a-response-to-rich-harris.md)
* [Template Fragments](@/essays/template-fragments.md)
* [Hypermedia Friendly Scripting](@/essays/hypermedia-friendly-scripting.md)
* [10 Tips For Building SSR/HDA applications](@/essays/10-tips-for-SSR-HDA-apps.md)
* [Template Fragments](@/essays/template-fragments.md)
* [View Transitions](@/essays/view-transitions.md)
* [REST Copypasta](@/essays/rest-copypasta.md)

### Complexity Very Very Bad
* [The Grug Brained Developer](https://grugbrain.dev)
* [Locality of Behavior (LoB)](@/essays/locality-of-behaviour.md)
* [Complexity Budget](@/essays/complexity-budget.md)

### Older [intercooler.js](https://intercoolerjs.org) Essays

* [Taking HTML Seriously](https://intercoolerjs.org/2020/01/14/taking-html-seriously)
* [HATEOAS Is For Humans](https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.html)
* [The API Churn/Security Trade-off](https://intercoolerjs.org/2016/02/17/api-churn-vs-security.html)
* [Rescuing REST From the API Winter](https://intercoolerjs.org/2016/01/18/rescuing-rest.html)

### Grug

* [The Grug Brained Developer](https://grugbrain.dev)

## Banners
<div style="text-align: center;margin:32px">
Expand Down
8 changes: 4 additions & 4 deletions www/content/essays/a-response-to-rich-harris.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ This is a valid point: with an MPA-style application your UI interactions are ga

Of course the problem with latency issues is that they can make an app feel laggy. But, like you, we have worked with plenty of laggy SPAs, so we must say the problem isn't neatly solved by simply adopting SPA frameworks. On top of that, optimistically synchronizing data with a server can lead to extremely difficult to understand data consistency issues as well as a significant increase in overall application complexity, a topic we will return to later.

### "Github Has UI Bugs"
### "GitHub Has UI Bugs"

Github does, indeed, have UI bugs. However, none of them are particularly difficult to solve.
GitHub does, indeed, have UI bugs. However, none of them are particularly difficult to solve.

htmx offers multiple ways to [update content beyond the target element](@/examples/update-other-content.md), all of them quite easy and any of which would work to solve the UI consistency issues Mr. Harris points out.

Contrast the Github UI issues with the Instagram UI issues Mr. Harris pointed out earlier: the Instagram issues would
Contrast the GitHub UI issues with the Instagram UI issues Mr. Harris pointed out earlier: the Instagram issues would
require far more sophisticated engineering work to resolve.

## Transitional Applications
Expand Down Expand Up @@ -167,7 +167,7 @@ unexpected happened: Python took off and, at the same time, javascript flat line

</div>

This trend of javascript peaking in the mid-2010's can be observed [on Github](https://www.benfrederickson.com/ranking-programming-languages-by-github-users/) as well:
This trend of javascript peaking in the mid-2010's can be observed [on GitHub](https://www.benfrederickson.com/ranking-programming-languages-by-github-users/) as well:

<div style="text-align:center">

Expand Down
4 changes: 2 additions & 2 deletions www/content/essays/hateoas.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ HTTP/1.1 200 OK
<html>
<body>
<form method="post" action="/accounts/12345/deposits">
<input name="amount" type="number'/>
<input name="amount" type="number" />
<button>Submit</button>
</div>
</form>
<body>
</html>
```
Expand Down
1 change: 1 addition & 0 deletions www/content/essays/template-fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Here are some known implementations of the fragment concept:
* [jinja_partials package](https://github.com/mikeckennedy/jinja_partials) ([discussion](https://github.com/mikeckennedy/jinja_partials/issues/1) on motivation)
* [chameleon_partials package](https://github.com/mikeckennedy/chameleon_partials)
* [htmlgenerator](https://github.com/basxsoftwareassociation/htmlgenerator)
* [django-template-partials](https://pypi.org/project/django-template-partials/) ([repository](https://github.com/carltongibson/django-template-partials))
* .NET
* [Giraffe.ViewEngine.Htmx](https://github.com/bit-badger/Giraffe.Htmx/tree/main/src/ViewEngine.Htmx)

Expand Down
6 changes: 3 additions & 3 deletions www/content/essays/when-to-use-hypermedia.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ to the simple [list view/detail view](@/examples/edit-row.md) approach many serv

One area where hypermedia can start to go a little wobbly is when you have UI dependencies that span structural
areas of the screen. A good example of this, and one that often comes up when discussing the hypermedia approach, is the issue
count number shown on the ["Issues" tab](https://github.com/bigskysoftware/htmx/issues) in Github. For a long time,
when you closed an issue on Github, the issue count on the tab did not update properly. Github, in general (although
count number shown on the ["Issues" tab](https://github.com/bigskysoftware/htmx/issues) in GitHub. For a long time,
when you closed an issue on GitHub, the issue count on the tab did not update properly. GitHub, in general (although
not exclusively), uses a hypermedia-style application.

"Ah ha!", exclaims the SPA enthusiast, "See, even GitHub can't get this right!"

Well, Github has fixed the issue, but it does demonstrate a problem with the hypermedia approach: how do you update
Well, GitHub has fixed the issue, but it does demonstrate a problem with the hypermedia approach: how do you update
disjoint parts of the UI cleanly? htmx offers [a few techniques for making this work](@/examples/update-other-content.md),
and Contexte, in their talk, discuss handling this situation very cleanly, using the event approach.

Expand Down
2 changes: 1 addition & 1 deletion www/content/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ than a single value.

### Event - `htmx:confirm` {#htmx:confirm}

This event is triggered immediate after a trigger occurs on an element. It allows you to cancel (or delay) issuing
This event is triggered immediately after a trigger occurs on an element. It allows you to cancel (or delay) issuing
the AJAX request. If you call `preventDefault()` on the event, it will not issue the given request. The `detail`
object contains a function, `evt.detail.issueRequest()`, that can be used to issue the actual AJAX request at a
later point. Combining these two features allows you to create an asynchronous confirmation dialog.
Expand Down
4 changes: 2 additions & 2 deletions www/content/examples/click-to-edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ template = "demo.html"

The click to edit pattern provides a way to offer inline editing of all or part of a record without a page refresh.

* This pattern starts with a UI that shows the details of a contact. The div has a button that will get the editing UI for the contact from `/contacts/1/edit`
* This pattern starts with a UI that shows the details of a contact. The div has a button that will get the editing UI for the contact from `/contact/1/edit`

```html
<div hx-target="this" hx-swap="outerHTML">
Expand Down Expand Up @@ -39,7 +39,7 @@ The click to edit pattern provides a way to offer inline editing of all or part
</form>
```

* The form issues a `PUT` back to `/contacts/1`, following the usual REST-ful pattern.
* The form issues a `PUT` back to `/contact/1`, following the usual REST-ful pattern.

{{ demoenv() }}

Expand Down
2 changes: 1 addition & 1 deletion www/content/posts/2020-11-24-htmx-1.0.0-is-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In [May](https://github.com/bigskysoftware/htmx/releases/tag/v0.0.1) htmx reache
who was interested in htmx as a base for his new reactive library, [Sprig](https://putyourlightson.com/plugins/sprig). Ben was willing to be an early adopter of htmx and pushed the library along
much faster than it would have gone otherwise.

I have been very lucky to the have help and feedback from many contributors in [Github](https://github.com/bigskysoftware/htmx/graphs/contributors) and on [Discord](https://htmx.org/discord). I'd like to thank, in particular, [Ben Pate](https://github.com/benpate), [Robert Schroll](https://github.com/rschroll) & [Alejandro Schmeichler](https://github.com/jreviews) for contributing code as well as new ideas and discussions.
I have been very lucky to the have help and feedback from many contributors in [GitHub](https://github.com/bigskysoftware/htmx/graphs/contributors) and on [Discord](https://htmx.org/discord). I'd like to thank, in particular, [Ben Pate](https://github.com/benpate), [Robert Schroll](https://github.com/rschroll) & [Alejandro Schmeichler](https://github.com/jreviews) for contributing code as well as new ideas and discussions.

I would like to thank [Devmode.fm](https://devmode.fm/) for having me on to [talk about htmx](https://devmode.fm/episodes/dynamic-html-with-htmx) and for cleaning up all my "uhhs" and "umms".

Expand Down
2 changes: 1 addition & 1 deletion www/content/posts/2020-6-30-htmx-0.0.7-is-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ I'm pleased to announce the [0.0.7 release](https://unpkg.com/browse/htmx.org@0.
* `view` - allows you to scroll the `top` or `bottom` of the target into view
* The [`hx-push-url`](@/attributes/hx-push-url.md) attribute now can optionally take a URL to push, in addition to `true` and `false`
* Added the [`hx-vars`](@/attributes/hx-vars.md) attribute that allows you to dynamically add to the parameters that will be submitted with a request
* You can now sponsor htmx development via [Github Sponsors](https://github.com/sponsors/bigskysoftware)
* You can now sponsor htmx development via [GitHub Sponsors](https://github.com/sponsors/bigskysoftware)
* A big thanks to our first sponsors!
* <https://github.com/putyourlightson>
* <https://github.com/simosentissi>
Expand Down
6 changes: 3 additions & 3 deletions www/content/posts/2023-06-06-htmx-github-accelerator.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
+++
title = "htmx is part of the Github Accelerator!"
title = "htmx is part of the GitHub Accelerator!"
date = 2023-06-06
[taxonomies]
tag = ["posts", "announcements"]
+++

We are excited to announce that htmx has been accepted into the first class of the
[Github Open Source Accelerator](https://accelerator.github.com/)! This is a tremendous opportunity to work with and
[GitHub Open Source Accelerator](https://accelerator.github.com/)! This is a tremendous opportunity to work with and
learn from some of the most successful open source developers and projects, and a great chance to get the message
out about hypermedia and htmx.

We plan on using this opportunity to begin work on htmx 2.0 and, we hope, possibly learn how to make working on htmx
a full time job!

Here are some of the other open source projects that we have met through the Github accelerator and that we recommend
Here are some of the other open source projects that we have met through the GitHub accelerator and that we recommend
people check out:

<ul>
Expand Down
6 changes: 6 additions & 0 deletions www/content/server-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ These examples may make it a bit easier to get started using htmx with your plat
### Phoenix

- <https://github.com/hungle00/todo-htmx>

## Go

### templ

- <https://templ.guide/server-side-rendering/htmx>
6 changes: 3 additions & 3 deletions www/content/talk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ template = "talk.html"

[htmx Discord Server](/discord)

[Github Discussions](https://github.com/bigskysoftware/htmx/discussions)
[GitHub Discussions](https://github.com/bigskysoftware/htmx/discussions)

## Feature Requests & Bug Reports

[Github Issues](https://github.com/bigskysoftware/htmx/issues)
[GitHub Issues](https://github.com/bigskysoftware/htmx/issues)

## Social

Expand All @@ -26,7 +26,7 @@ Email: [htmx@bigsky.software](mailto:htmx@bigsky.software)

<iframe src="https://github.com/sponsors/bigskysoftware/card" title="Sponsor bigskysoftware" height="225" width="600" style="border: 0;"></iframe>

## Github Stars
## GitHub Stars

<iframe style="width:100%;height:auto;min-width:600px;min-height:400px;" src="https://star-history.com/embed?secret=Z2hwX3oybDFUTnBMSTZBaXNhcjFwZmN5UVRnZEFSR3JFdTRPckV2Rw==#bigskysoftware/htmx&bigskysoftware/_hyperscript&Date" frameBorder="0"></iframe>

Expand Down

0 comments on commit 2edb023

Please sign in to comment.