From a19cc5cb76e2ecf8acb1bd4c852ea8257bdc959b Mon Sep 17 00:00:00 2001 From: Paramtamtam <7326800+tarampampam@users.noreply.github.com> Date: Wed, 3 Jul 2024 19:07:17 +0400 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=F0=9F=93=9A=20Readme=20file=20?= =?UTF-8?q?updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index 63e186f..4e5fc9b 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,50 @@ are detailed in the readme file below. To proxy HTTP headers from requests to responses, utilize the `--proxy-headers` flag or environment variable (comma-separated list of headers). +
+ 🚀 Start the HTTP server with my custom template (theme) + +First, create your own template file, for example `my-super-theme.html`: + +```html + + + + {{ code }} + + +

YEAH! {{ message }}: {{ description }}

+ + +``` + +And simply start the server with the following command: + +```bash +docker run --rm \ + -v "$(pwd)/my-super-theme.html:/opt/my-template.html:ro" \ + -p '8080:8080/tcp' ghcr.io/tarampampam/error-pages:3.0.0-beta-1 \ + serve --add-template /opt/my-template.html --template-name my-template +``` + +And test it: + +```bash +$ curl -H "Accept: text/html" http://127.0.0.1:8080/503 + + + + + 503 + + +

YEAH! Service Unavailable: The server is temporarily overloading or down

+ + +``` + +
+
🚀 Generate a set of error pages using built-in or my own template