mirror of
https://github.com/donlon/cloudflare-error-page.git
synced 2025-12-19 14:59:28 +00:00
doc: doc fixes
This commit is contained in:
20
README.md
20
README.md
@@ -12,7 +12,7 @@ Here's an editor for the error page. You can try this out [here](https://virt.mo
|
|||||||
|
|
||||||
## Quickstart for Programmers
|
## Quickstart for Programmers
|
||||||
|
|
||||||
Install `cloudflare-error-page` using pip
|
Install `cloudflare-error-page` with pip.
|
||||||
|
|
||||||
``` Bash
|
``` Bash
|
||||||
pip install git+https://github.com/donlon/cloudflare-error-page.git
|
pip install git+https://github.com/donlon/cloudflare-error-page.git
|
||||||
@@ -54,10 +54,10 @@ with open('error.html', 'w') as f:
|
|||||||
webbrowser.open('error.html')
|
webbrowser.open('error.html')
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also see this example [here](https://virt.moe/cloudflare-error-page/examples/default).
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
You can also see this example [here](https://virt.moe/cloudflare-error-page/examples/default).
|
||||||
|
|
||||||
## More Examples
|
## More Examples
|
||||||
|
|
||||||
### Catastrophic infrastructure failure
|
### Catastrophic infrastructure failure
|
||||||
@@ -93,11 +93,10 @@ params = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
See this example [here](https://virt.moe/cloudflare-error-page/examples/catastrophic).
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
[link](https://virt.moe/cloudflare-error-page/examples/catastrophic).
|
||||||
|
|
||||||
### Web server is working
|
### Web server is working
|
||||||
|
|
||||||
``` JavaScript
|
``` JavaScript
|
||||||
@@ -126,13 +125,14 @@ params = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
See this example [here](https://virt.moe/cloudflare-error-page/examples/working).
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
[link](https://virt.moe/cloudflare-error-page/examples/working).
|
||||||
|
|
||||||
|
|
||||||
### Using Flask server
|
### Using Flask server
|
||||||
|
|
||||||
See [flask_server.py](examples/flask_server.py)
|
See [flask_server.py](examples/flask_server.py) for embedding the error pages into the server
|
||||||
|
|
||||||
|
|
||||||
## Full Parameter Reference
|
## Full Parameter Reference
|
||||||
@@ -140,7 +140,7 @@ See [flask_server.py](examples/flask_server.py)
|
|||||||
{
|
{
|
||||||
"html_title": "cloudflare.com | 500: Internal server error",
|
"html_title": "cloudflare.com | 500: Internal server error",
|
||||||
"title": "Internal server error",
|
"title": "Internal server error",
|
||||||
"error_code": 999,
|
"error_code": 500,
|
||||||
"time": "2025-11-18 12:34:56 UTC", // if not set, current UTC time is shown
|
"time": "2025-11-18 12:34:56 UTC", // if not set, current UTC time is shown
|
||||||
|
|
||||||
// Configuration for "Visit ... for more information" line
|
// Configuration for "Visit ... for more information" line
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
{% if show_creator %}
|
{% if show_creator %}
|
||||||
<span class="cf-footer-separator sm:hidden">•</span>
|
<span class="cf-footer-separator sm:hidden">•</span>
|
||||||
<span class="cf-footer-item sm:block sm:mb-1">Created by <a href="https://virt.moe/cloudflare-error-page/editor/" target="_blank">CF Error Page Editor</a></span>
|
<span class="cf-footer-item sm:block sm:mb-1">Created with <a href="https://virt.moe/cloudflare-error-page/editor/" target="_blank">CF Error Page Editor</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div><!-- /.error-footer -->
|
</div><!-- /.error-footer -->
|
||||||
|
|||||||
@@ -507,7 +507,7 @@
|
|||||||
<h5 class="form-row">Cloudflare Error Page Editor</h5>
|
<h5 class="form-row">Cloudflare Error Page Editor</h5>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-row mb-3">
|
<div class="form-row mb-3">
|
||||||
<label for="presetSelect">Preset:</label>
|
<label for="presetSelect">Preset</label>
|
||||||
<select id="presetSelect" class="form-select form-select-sm">
|
<select id="presetSelect" class="form-select form-select-sm">
|
||||||
<option value="default">Default</option>
|
<option value="default">Default</option>
|
||||||
<option value="empty">Empty</option>
|
<option value="empty">Empty</option>
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="cloudflare_location">Location</label>
|
<label for="cloudflare_location">Location</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input id="cloudflare_location" class="form-control form-control-sm" placeholder="Cloud" />
|
<input id="cloudflare_location" class="form-control form-control-sm" placeholder="San Francisco" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -761,8 +761,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-2" style="font-size: 0.9em;">You can also embed the error page into your own website. See
|
<div class="mt-2" style="font-size: 0.9em;">You can also embed the error page into your own website. See
|
||||||
<a href="https://github.com/donlon/cloudflare-error-page#quickstart" target="_blank">Quickstart</a> in the
|
<a href="https://github.com/donlon/cloudflare-error-page#quickstart-for-programmers" target="_blank">Quickstart</a> in the
|
||||||
homepage.
|
homepage for steps.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user