Skip to content

Commit efcc6b2

Browse files
Add descriptions for /headers/* and /api (#3221)
* Add descriptions for /headers/* and /api * Add a missing space in a description
1 parent 103c72e commit efcc6b2

File tree

8 files changed

+19
-1
lines changed

8 files changed

+19
-1
lines changed

www/content/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
+++
22
title = "Javascript API"
3+
description = """\
4+
This documentation describes the JavaScript API for htmx, including methods and properties for configuring the \
5+
behavior of htmx, working with CSS classes, AJAX requests, event handling, and DOM manipulation. The API provides \
6+
helper functions primarily intended for extension development and event management."""
37
+++
48

59
While it is not a focus of the library, htmx does provide a small API of helper methods, intended mainly for [extension development](https://htmx.org/extensions) or for working with [events](@/events.md).

www/content/essays/interviews/leonard_richardson.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
+++
22
title = "An interview with Leonard Richardson"
33
description = """\
4-
In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses\
4+
In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses \
55
the history of REST, interoperability in APIs and his impression of newer approaches such as GraphQL."""
66
date = 2025-02-19
77
updated = 2025-02-19

www/content/headers/hx-location.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
+++
22
title = "HX-Location Response Header"
3+
description = """\
4+
Use the HX-Location response header in htmx to trigger a client-side redirection without reloading the whole page."""
35
+++
46

57
This response header can be used to trigger a client side redirection without reloading the whole page. Instead of changing the page's location it will act like following a [`hx-boost` link](@/attributes/hx-boost.md), creating a new history entry, issuing an ajax request to the value of the header and pushing the path into history.

www/content/headers/hx-push-url.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
+++
22
title = "HX-Push-Url Response Header"
3+
description = """\
4+
Use the HX-Push-Url response header in htmx to push a URL into the browser location history."""
35
+++
46

57
The `HX-Push-Url` header allows you to push a URL into the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API).

www/content/headers/hx-push.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
+++
22
title = "HX-Push Response Header (Deprecated)"
3+
description = """\
4+
The HX-Push response header in htmx is deprecated. Use HX-Push-Url instead."""
35
+++
46

57
The `HX-Push` header has been replaced by [`HX-Push-Url`](@/headers/hx-push-url.md)

www/content/headers/hx-redirect.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "HX-Redirect Response Header"
3+
description = """\
4+
Use the HX-Redirect response header in htmx to trigger a client-side redirection that will perform a full page \
5+
reload."""
36
+++
47

58
This response header can be used to trigger a client side redirection to a new url that will do a full reload of the whole page. It uses the browser to redirect to the new location which can be useful when redirecting to non htmx endpoints that may contain different HTML `head` content or scripts. See [`HX-Location`](@/headers/hx-location.md) if you want more control over the redirect or want to use ajax requests instead of full browser reloads.

www/content/headers/hx-replace-url.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "HX-Replace-Url Response Header"
3+
description = """\
4+
Use the HX-Replace-Url response header in htmx to replace the current URL in the browser location history without \
5+
creating a new history entry."""
36
+++
47

58
The `HX-Replace-Url` header allows you to replace the current URL in the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API).

www/content/headers/hx-trigger.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
+++
22
title = "HX-Trigger Response Headers"
3+
description = """\
4+
Use the HX-Trigger family of response headers in htmx to trigger client-side actions from an htmx response."""
35
+++
46

57
These response headers can be used to trigger client side actions on the target element within a response to htmx. You

0 commit comments

Comments
 (0)