9
0
mirror of https://github.com/donlon/cloudflare-error-page.git synced 2025-12-19 14:59:28 +00:00

doc: update README.md

This commit is contained in:
Anthony Donlon
2025-11-19 20:27:02 +08:00
parent e157aee7c9
commit a3757f3a76
2 changed files with 15 additions and 3 deletions

View File

@@ -1,11 +1,21 @@
# Customizable Cloudflare error page generator
# Cloudflare Error Page Generator
## QuickStart Guide (Python)
## What does this project do?
This project creates customized error pages that mimics Cloudflare's error page. And you can embed it into your website.
![Default error page](doc/default.png)
## Quickstart
Install cloudflare-error-page using pip
``` Bash
pip install git+https://github.com/donlon/cloudflare-error-page.git
```
Then you can generate an error page based on parameters you like. (See [example.py](examples/example.py))
``` Python
import webbrowser
from cloudflare_error_page import render as render_cf_error_page
@@ -34,7 +44,9 @@ with open('error.html', 'w') as f:
webbrowser.open('error.html')
```
## Examples
## More Examples
### Catastrophic infrastructure failure
``` Python
params = {

BIN
doc/default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB