You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection of modern, responsive, and brandable [HTML error pages](https://www.presslabs.com/how-to/error-pages/) (e.g., `404`, `500`) designed to turn frustrating moments into memorable, on-brand experiences—with an optional dose (customizable) of sarcasm, irony, and humor. Built for server administrators who are bored with the default Apache/Nginx error docs. This repository is hosted on [GitLab](https://gitlab.com/thaikolja/modern-html-error-docs) and mirrored to [GitHub](https://github.com/thaikolja/modern-html-error-docs).
5
+
A collection of modern, responsive, and brandable [HTML error pages](https://www.presslabs.com/how-to/error-pages/) (e.g., `404`, `500`) designed to turn frustrating moments into memorable, on-brand experiences—with an optional dose (customizable) of sarcasm, irony, and humor. Built for server administrators who are bored with the default Apache/Nginx error docs.
6
+
7
+
This repository is hosted on [GitLab](https://gitlab.com/thaikolja/modern-html-error-docs) and mirrored to [GitHub](https://github.com/thaikolja/modern-html-error-docs).
8
+
9
+
---
6
10
7
11
**Example for the error code 503:**
8
12
9
-

13
+

10
14
11
15
## Features
12
16
@@ -17,129 +21,101 @@ A collection of modern, responsive, and brandable [HTML error pages](https://www
17
21
- 🧹 **Organized Structure:** Clear separation of CSS, JavaScript, and image assets.
18
22
- ⚒️ **Customizable:** Easily modify docs, styling, and robot images to match your brand.
19
23
20
-
## Getting Started
21
-
22
-
Although the error docs have been built for Linux servers, please note that the following paths and folders may not be accurate for your specific distribution.
24
+
## Requirements
23
25
24
-
### Requirements
25
-
26
-
- A server running Linux
27
-
- An installed web server, e.g., Apache or Nginx
28
-
- Access to your server's standard error docs files
26
+
- Server running Linux
27
+
- Installed web server, e.g., Apache or Nginx
28
+
- Access to your server's (standard) error docs files, e.g., root access
29
29
30
30
## Installation
31
31
32
-
> [!NOTE]
32
+
> [!WARNING]
33
33
>
34
-
> For this installation, a Debian 12 server running Plesk, Apache, and Nginx is used. Some file paths may differ from those in your distribution.
34
+
> Although the error docs have been built for Linux servers, please note that the following paths and folders **may not be accurate for your specific distribution.**
35
35
36
36
### Install from Build
37
37
38
-
An **already built version** with minified assets and only the necessary files that need to be moved to the server.
38
+
Download the pre-built version with minified assets and only the necessary files that need to be transferred to the server.
39
39
40
40
1. Use SSH to log in to your server as a user with enough permission (see: "Requirements")
41
41
42
-
2.Change into the directory where the error message files are being stored. In this case, it's the following directory for **new domains**. Already existing domains are located in `/var/www/vhosts/DOMAIN.COM/error-docs`.
42
+
2.Find the directory that stores the server's default error docs (example: `/var/www/error-docs`) and `cd` into this directory
43
43
44
-
```bash
45
-
cd /var/www/vhosts/.skel/0
46
-
```
44
+
3. Head to the "Release" section on [GitLab](https://gitlab.com/thaikolja/modern-html-error-docs/-/releases) or [GitHub](https://github.com/thaikolja/modern-html-error-docs/releases) and copy the URL of **the latest version's .zip file** named `error-docs-built.zip`
47
45
48
-
3. Create a backup of the default error docs folder:
46
+
4. Create a backup of the already existing files:
49
47
50
48
```bash
51
-
zip -r error-docs-backup.zip error_docs
49
+
cp -r error-docs error-docs_backup
52
50
```
53
51
54
-
4. Head to the "Release" section on GitLab or GitHub and copy the URL of the latest version's .zip file:
52
+
5. Unzip the downloaded archive and set permissions:
10. 🥳 Your Modern HTML Error Docs are successfully installed!
94
+
2. `cd` into the directory:
125
95
126
-
### Via Git
96
+
```bash
97
+
cd modern-html-error-docs
98
+
```
127
99
128
-
1. Clone the main repository with unminified codes:
100
+
3. Install necessary packages to build the distribution package:
129
101
130
102
```bash
103
+
npm i
104
+
# or `yarn`, `bun i`, or whatever package manager you prefer
131
105
```
132
106
133
-
2. Apply your changes.
107
+
4. Build the package:
134
108
135
-
3. Clea
109
+
```bash
110
+
npm run package # or with other package managers
111
+
```
112
+
113
+
5. Use the content `dist/` folder to replace your error docs.
136
114
137
115
## Customization
138
116
139
117
### Messages and Texts
140
118
141
-
These error docs
142
-
143
119
All error docs are stored in`assets/data/docs.json`. You can edit this file to change the titles, descriptions, and robot speech for each error code.
144
120
145
121
```json
@@ -157,32 +133,20 @@ All error docs are stored in `assets/data/docs.json`. You can edit this file to
157
133
158
134
### Styling
159
135
160
-
Modify the `assets/css/main.css` file to change the visual appearance of the error pages. The CSS uses nesting for better readability and maintainability.
136
+
Modify the **source**`assets/css/main.css` file to change the visual appearance of the error pages. The CSS uses nesting for better readability and maintainability.
161
137
162
138
### Images
163
139
164
140
Replace or add new robot images in the `assets/img/` directory. Ensure you update the `srcset` and `src` attributes in the respective HTML files if you change the image filenames.
165
141
166
142
### JavaScript
167
143
168
-
The `assets/js/scripts.js` file handles the dynamic loading of docs from `docs.json` and can be extended for additional client-side functionality.
169
-
170
-
## What's Next
171
-
172
-
* Creating a way of easier deployment
173
-
* Accurate Linux distribution determination
174
-
* Expanding `README.md` for the most used Linux distributions
144
+
The `assets/js/scripts.js` file handles the dynamic loading of docs from `docs.json` and can be extended for additional client-side functionality (use the **source file** from the repository).
175
145
176
146
## Contributing
177
147
178
148
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
179
149
180
-
1. Fork the Project
181
-
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
182
-
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
183
-
4. Push to the Branch (`git push origin feature/AmazingFeature`)
0 commit comments