From bcddd3bbbea1a64a3fa9d71254f143246116b5b3 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Fri, 10 Nov 2023 14:23:27 +0100 Subject: feat: support for custom templates (#129) Adds a `-templates` flag that can be used to provide an alternative directory with templates for Sally to use. The new templates override the default set embedded in Sally. This includes a new 404 template so that 404 errors use the same theme as the rest of the website. Additionally, for HTTP status >400, this also sets the Cache-Control header to discourage CDNs like Cloudflare from caching the page. Resolves #125, #18 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 77fcadf..21f76e1 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,10 @@ use the `-yml` and `-port` flags. ``` $ sally -yml site.yaml -port 5000 ``` + +### Custom Templates + +You can provide your own custom templates. For this, create a directory with `.html` +templates and provide it via the `-templates` flag. You only need to provide the +templates you want to override. See [templates](./templates/) for the available +templates. -- cgit v1.2.3