'simple' copy edits
This commit is contained in:
parent
f243111200
commit
af41dc1a57
1 changed files with 3 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ We start by configuring Hugo to serve all the HTML files in a directory. Its con
|
|||
|
||||
These configuration lines tell Hugo to take the directory `partials` and all of its contents, and make them available as `content`. That is, make the contents available to our site users.
|
||||
|
||||
This allows us to fetch any HTML file from `partials` with htmx (or simple HTTP requests).
|
||||
This allows us to fetch any HTML file from `partials` with htmx (or any HTTP requests).
|
||||
|
||||
So for example, we can fetch the file `partials/content.html` by adding the following HTML to any markdown file. You can find the following snippet at the bottom of `content/posts/hello-world.md`.
|
||||
|
||||
|
|
@ -78,11 +78,11 @@ This is all good and well. We can dynamically load content from our Hugo site wh
|
|||
|
||||
### Introducing an API server
|
||||
|
||||
`hugo-htmx-go-template` comes with a simple web server from which much more complex functionality can be built. It's important to remember that all web applications are simply a combination of forms and buttons that do stuff when users interact with them. We've shown how to make a button load content dynamically, but what about forms? Can our Hugo site process form data?
|
||||
`hugo-htmx-go-template` comes with a bare bones web server from which much more complex functionality can be built. It's important to remember that all web applications are simply a combination of forms and buttons that do stuff when users interact with them. We've shown how to make a button load content dynamically, but what about forms? Can our Hugo site process form data?
|
||||
|
||||
Indeed it can. And that means we can build entire web applications with Hugo as the templating and build system, and something else as the "backend".
|
||||
|
||||
`hugo-htmx-go-template` provides such a backend. `server.go` is a simple Go web server that renders `html/template` or [templ](https://github.com/a-h/templ) templates, for those who prefer to write templates in pure Go. Of course, this is only a rudimentary web server. As the name suggests, `hugo-htmx-go-template` is simply a template from which to build projects. It is itself a simple Hugo project with some added tooling, and an optional web server, but we'll get to that.
|
||||
`hugo-htmx-go-template` provides such a backend. `server.go` is a Go web server that renders `html/template` or [templ](https://github.com/a-h/templ) templates, for those who prefer to write templates in pure Go. Of course, this is only a rudimentary web server. As the name suggests, `hugo-htmx-go-template` is simply a template from which to build projects. It is itself a simple Hugo project with some added tooling, and an optional web server, but we'll get to that.
|
||||
|
||||
**Let's process form data from our Hugo site.**
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue