From 95545a041b3e04ae574b9eea7b571f8db0006d01 Mon Sep 17 00:00:00 2001 From: infogulch Date: Thu, 22 Feb 2024 20:13:42 -0600 Subject: [PATCH] Update caddy with reference to new xtemplate-caddy module --- README.md | 25 +++++++++++++++---------- TODO.md | 13 ++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 9f25b7e..f362f50 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/TODO.md b/TODO.md index 59e28f1..addd6fd 100644 --- a/TODO.md +++ b/TODO.md @@ -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 @@ -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 @@ -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