Simon Ser
b891a95fcf
Rename project to alps
4 jaren geleden
Simon Ser
892f1fa581
Remove outdated TODO
4 jaren geleden
Simon Ser
3347e69480
Use %q to quote values in format strings
4 jaren geleden
Simon Ser
9fdccc3a4b
Rename template.go to renderer.go
4 jaren geleden
Simon Ser
8b10324ab6
go fmt
4 jaren geleden
Dejan Strbac
83a5132d15
Add current path to the global context
4 jaren geleden
Simon Ser
c38b1d47f9
Fix panic when injecting a template with nil data
4 jaren geleden
Simon Ser
ad1d2ee7f4
Implement plugin/template reload on SIGUSR1
There's no way around having a global mutex, because we need to update
the HTTP routes when reloading plugins. During reload we need to lock
the whole server.
Closes: https://todo.sr.ht/~sircmpwn/koushin/43
4 jaren geleden
Simon Ser
97b314b6e7
Add Server.Reload
This only reloads templates for now. In the future it'll also reload
Lua plugins.
4 jaren geleden
Simon Ser
020e27fe45
Add Context to Plugin.Inject
This allows to access the request metadata and the session from injectors.
4 jaren geleden
Simon Ser
ca3672df2a
Add RenderData interface
This allows Go plugins to easily inject global data.
4 jaren geleden
Simon Ser
d8a875a5f7
Rename RenderData to BaseRenderData
RenderData will be used for an interface.
4 jaren geleden
Simon Ser
e93346ffa9
Remove the public/ directory
Now that all templates are provided by plugins, there's no need to have
a public/ directory. Themes can be in /themes instead of /public/themes.
4 jaren geleden
Simon Ser
d897eeee5c
Introduce base plugin
This plugin offers base IMAP/SMTP functionality.
References: https://todo.sr.ht/~sircmpwn/koushin/39
4 jaren geleden
Simon Ser
f07ab52632
Add docs
4 jaren geleden
Simon Ser
1b5bc568fb
Allow plugins to provide their own templates
4 jaren geleden
Simon Ser
e54a359acb
Export Server.{Sessions,Plugins}
And unexport a few internal functions.
4 jaren geleden
Simon Ser
d8f411176f
Export Context
This allows plugins to access it.
4 jaren geleden
Simon Ser
835e9e5033
go fmt
4 jaren geleden
Simon Ser
3748b4413e
Introduce GlobalRenderData and RenderData
GlobalRenderData contains some global metadata that can be obtained from
any template.
RenderData is a base type for template data. It contains a Global field
with global metadata and an Extra field for plugins.
4 jaren geleden
Simon Ser
edf738f23d
Load all themes on startup
This is the first step to allow each user to have a different theme.
4 jaren geleden
Simon Ser
4a504b0fc6
Rename Plugin.Render to Plugin.Inject
This function doesn't render anything, it just adds extra data to the
template data.
4 jaren geleden
Simon Ser
76599232dc
Add a Lua API to set template filters
4 jaren geleden
Simon Ser
4f74722c14
Add basic support for plugins
4 jaren geleden
Simon Ser
e94b1311de
Add basic theme support
References: https://todo.sr.ht/~sircmpwn/koushin/1
4 jaren geleden
Simon Ser
a4729060be
Escape mailbox names in URLs
Closes: https://todo.sr.ht/~sircmpwn/koushin/14
4 jaren geleden
Simon Ser
be14524c33
Display & download any message part
4 jaren geleden
Simon Ser
fce17c9733
Linkify mailbox list
4 jaren geleden
Simon Ser
a1a067e6de
Add HTTP server boilerplate
4 jaren geleden