Skip to content

Commit

Permalink
Update caddy with reference to new xtemplate-caddy module
Browse files Browse the repository at this point in the history
  • Loading branch information
infogulch committed Feb 23, 2024
1 parent 4184efe commit 95545a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,28 +308,33 @@ when making a custom build.
#### 3. As a Go library
Create an `xtemplate.Config` and customize it, then call `Build(config)`. This gives you a `http.Handler` that will
serve requests. See [`config.go`](./config.go) for a complete config reference.
Create an `xtemplate.Config` and customize it, then call `Build(config)`. This
gives you a `http.Handler` that will serve requests. See
[`config.go`](./config.go) for a complete config reference.
#### 4. As a Caddy plugin
Download [Caddy](https://caddyserver.com) with xtemplate built in as the `xtemplate-caddy` middleware plugin:
> [Caddy](https://caddyserver.com) is a fast and extensible multi-platform
> HTTP/1-2-3 web server with automatic HTTPS
https://caddyserver.com/download?package=github.com%2Finfogulch%2Fxtemplate%2Fcaddy
Download Caddy with `xtemplate-caddy` middleware plugin built-in:
Then configure Caddy as an xtemplate middlware handler:
https://caddyserver.com/download?package=github.com%2Finfogulch%2Fxtemplate-caddy
```Caddyfile
Then configure Caddy with xtemplate as a route handler:
```Caddy
:8080
route {
xtemplate {
/* See xtemplate-caddy for
}
xtemplate
}
```
The `xtemplate-caddy` module is built on top of the Go library API.
Find more information about how to configure xtemplate for caddy, see the
module's repository: https://github.com/infogulch/xtemplate-caddy
`xtemplate-caddy` is built on top of the Go library API.
### 🧰 Template semantics
Expand Down
13 changes: 6 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# TODO

- [ ] Republish caddy module as github.com/infogulch/xtemplate-caddy

### Automation

- Add github workflows
- [ ] Set up go tests
- [ ] Publish binaries and release when a git tag is pushed
- [ ] Write Go api tests
- [ ] Write CLI tests

### Application

Expand All @@ -21,11 +18,14 @@
- [ ] Add a way to register additional routes dynamically during init
- [ ] Organize docs according to https://diataxis.fr/
- [ ] Demonstrate how to integrate with [caddy-git](https://github.com/greenpau/caddy-git) for zero-CI app deployments
- [ ] Refactor watch to be easier to use from both Main() and xtemplate-caddy.

# DONE

## v0.2 - Feb 2024
## v0.3 - Feb 2024

- [x] Republish caddy module as github.com/infogulch/xtemplate-caddy
- [x] Add github workflow to publish binaries and release when a git tag is pushed
- [x] Rewrite configuration to be normal
- [x] Add Why and How to use sections to README
- [x] Remove caddy module, to republish as github.com/infogulch/xtemplate-caddy
Expand All @@ -40,7 +40,6 @@
- [x] Don't route hidden files that start with a '.', not a '_'. We don't need to reinvent hidden files.
- [x] Fix docs, tests after `_` -> `.` change.


## v0.1 - Oct 2023

- [x] Make extrafuncs an array
Expand Down

0 comments on commit 95545a0

Please sign in to comment.