From e78d2db3ea0fbf75a248d0bb2e9bf724e7836272 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 17 Dec 2019 10:58:31 +0100 Subject: Improve docs --- README.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 458b5a9..e5fb1d5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,20 @@ Assets in `themes//assets/*` are served by the HTTP server at ## Plugins -Lua plugins are supported. They can be dropped in `plugins//main.lua`. +Plugins can be written in Go or in Lua and live in `plugins//`. + +Plugins can provide their own templates in `plugins//public/*.html`. +Assets in `plugins//public/assets/*` are served by the HTTP server at +`/plugins//assets/*`. + +### Go plugins + +They can use the [Go plugin helpers] and need to be included at compile-time in +`cmd/koushin/main.go`. + +### Lua plugins + +The entry point is at `plugins//main.lua`. API: @@ -28,15 +41,14 @@ API: * `koushin.set_route(method, path, f)`: register a new HTTP route, `f` will be called with the HTTP context -Plugins can provide their own templates in `plugins//public/*.html`. -Assets in `plugins//public/assets/*` are served by the HTTP server at -`/plugins//assets/*`. - ## Contributing -Send patches [on the mailing list](https://lists.sr.ht/~sircmpwn/koushin), -report bugs [on the issue tracker](https://todo.sr.ht/~sircmpwn/koushin). +Send patches on the [mailing list], report bugs on the [issue tracker]. ## License MIT + +[Go plugin helpers]: https://godoc.org/git.sr.ht/~emersion/koushin#GoPlugin +[mailing list]: https://lists.sr.ht/~sircmpwn/koushin +[issue tracker]: https://todo.sr.ht/~sircmpwn/koushin -- cgit v1.2.3-59-g8ed1b