aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLibravatarLibravatar Simon Ser <[email protected]> 2019-12-17 10:58:31 +0100
committerLibravatarLibravatar Simon Ser <[email protected]> 2019-12-17 10:58:31 +0100
commite78d2db3ea0fbf75a248d0bb2e9bf724e7836272 (patch)
tree3a7b459c3d55e8e58339cb2eac9477ec93acd608 /README.md
parenta425e17b0eda3dd7e961127670a46a3b3b2c3d19 (diff)
downloadalps-e78d2db3ea0fbf75a248d0bb2e9bf724e7836272.tar.gz
alps-e78d2db3ea0fbf75a248d0bb2e9bf724e7836272.tar.bz2
alps-e78d2db3ea0fbf75a248d0bb2e9bf724e7836272.zip
Improve docs
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 19 insertions, 7 deletions
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/<name>/assets/*` are served by the HTTP server at
## Plugins
-Lua plugins are supported. They can be dropped in `plugins/<name>/main.lua`.
+Plugins can be written in Go or in Lua and live in `plugins/<name>/`.
+
+Plugins can provide their own templates in `plugins/<name>/public/*.html`.
+Assets in `plugins/<name>/public/assets/*` are served by the HTTP server at
+`/plugins/<name>/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/<name>/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/<name>/public/*.html`.
-Assets in `plugins/<name>/public/assets/*` are served by the HTTP server at
-`/plugins/<name>/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