-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into document-symbol
- Loading branch information
Showing
51 changed files
with
735 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,6 @@ result | |
|
||
# Go workspace. | ||
go.work | ||
|
||
# direnv | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.2.753 | ||
0.2.766 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
(function () { | ||
(function() { | ||
let templ_reloadSrc = window.templ_reloadSrc || new EventSource("/_templ/reload/events"); | ||
templ_reloadSrc.onmessage = (event) => { | ||
if (event && event.data === "reload") { | ||
window.location.reload(); | ||
} | ||
}; | ||
window.templ_reloadSrc = templ_reloadSrc; | ||
window.onbeforeunload = () => window.templ_reloadSrc.close(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Experimental packages | ||
|
||
Experimental Packages for templ are available at https://github.com/templ-go/x/ | ||
|
||
:::warning | ||
- Packages in this module are experimental and may be removed at any time. | ||
- There is no guarantee of compatibility with future versions. | ||
- There is no guarantee of stability. | ||
- Use at your own risk. | ||
::: | ||
|
||
## Approval Process | ||
|
||
As of right now, there is no formal approval process for packages to be stabilized and moved into https://github.com/a-h/templ. Feel free to contribute via GitHub discussions at https://github.com/a-h/templ/discussions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# urlbuilder | ||
|
||
A simple URL builder to construct a `templ.SafeURL`. | ||
|
||
```templ title="component.templ" | ||
import ( | ||
"github.com/templ-go/x/urlbuilder" | ||
"strconv" | ||
"strings" | ||
) | ||
templ component(o Order) { | ||
<a | ||
href={ urlbuilder.New("https", "example.com"). | ||
Path("orders"). | ||
Path(o.ID). | ||
Path("line-items"). | ||
Query("page", strconv.Itoa(1)). | ||
Query("limit", strconv.Itoa(10)). | ||
Build() } | ||
> | ||
{ strings.ToUpper(o.Name) } | ||
</a> | ||
} | ||
``` | ||
|
||
See [URL Attribures](/syntax-and-usage/attributes#url-attributes) for more information. | ||
|
||
## Feedback | ||
|
||
Please leave your feedback on this feature at https://github.com/a-h/templ/discussions/867 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"position": 13, | ||
"label": "Experimental" | ||
} |
2 changes: 1 addition & 1 deletion
2
...ocs/13-help-and-community/_category_.json → ...ocs/14-help-and-community/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"position": 13, | ||
"position": 14, | ||
"label": "Help and community" | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
docs/docs/14-faq/_category_.json → docs/docs/15-faq/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"position": 14, | ||
"position": 15, | ||
"label": "FAQ" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Example | ||
|
||
This example demonstrates the usage of templ with gofiber. | ||
|
||
As soon as you start the server you can access http://localhost:3000/ and see the rendered page. | ||
|
||
If you change the URL to http://localhost:3000/john you will see your parameter printed on the page. | ||
|
||
This happens both through parameter passing into the templ component and through context using fiber locals. | ||
|
||
## Tasks | ||
|
||
### build-templ | ||
|
||
``` | ||
templ generate | ||
``` | ||
|
||
### run | ||
|
||
``` | ||
go run . | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.