diff --git a/examples/plugins/ui-next-plugin/index.ts b/examples/plugins/ui-next-plugin/index.ts new file mode 100644 index 000000000..10384ad31 --- /dev/null +++ b/examples/plugins/ui-next-plugin/index.ts @@ -0,0 +1,29 @@ +import { Context, Handler } from 'hydrooj'; + +// Server side of the example plugin. It registers a couple of routes whose +// handlers set a `template`; with @hydrooj/ui-next installed the `next` renderer +// (priority 100) wins for every template, ignores the template file, and injects +// the route/template name into the SPA shell. The client then renders the page +// registered under `page: