error-pages/templates/readme.md

16 lines
796 B
Markdown
Raw Normal View History

2022-01-31 09:45:12 +00:00
# Templates
2024-07-03 14:12:13 +00:00
Creating templates is a straightforward process, even for those unfamiliar
with [Go Template](https://pkg.go.dev/text/template). Here are a few things to keep in mind:
2022-01-31 09:45:12 +00:00
2024-07-03 14:12:13 +00:00
- The template should be a single page, without additional `css` or `js` files. However, you can load them from a
CDN or other GitHub repositories using [jsdelivr.com](https://www.jsdelivr.com/)
- Be sure to include the `<meta name="robots" content="nofollow,noarchive,noindex">` tag in the header
- You can use special "placeholders" (wrapped in `{{` and `}}`) for the rendering error code, message, and other
details
2022-01-31 09:45:12 +00:00
2024-07-03 14:12:13 +00:00
Built-in "placeholders" and functions with their examples can be found in the following files:
2022-01-31 09:45:12 +00:00
2024-07-03 14:12:13 +00:00
- [props.go](../internal/template/props.go)
- [template.go](../internal/template/template.go)