Skip to content

Commit

Permalink
docs: update README (#4)
Browse files Browse the repository at this point in the history
* docs: update README

* 1.0.2
  • Loading branch information
sapachev authored Jan 27, 2023
1 parent a3a870d commit 999b11b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Lightweight tool to create static HTTP Error Pages in minimalistic adaptive and
* Customization
* Localization (i18n)
* Accessibility (a11y)
* Built-in web-server config generator (Nginx)
* Built-in web server config generator (Nginx)

![Screenshot](https://sapachev.com/share/error-pages/screenshot.png)

Expand All @@ -32,10 +32,10 @@ Lightweight tool to create static HTTP Error Pages in minimalistic adaptive and
Requirements: installed Node.js 11+

1. Checkout this repository to your local machine
2. Run `npm i` command to install dependencies
3. Run `npm run build` command to compile error pages and config
4. Copy static html-files from `dist` directory to your server
5. Copy and apply config snippet from `dist` to your web-server configuration (see details below).
2. Run `npm install --production` command to install dependencies
3. Run `npm run build` command to compile error pages and web server configs
4. Copy static html files from `dist` directory to your server
5. Copy and apply config snippet from `dist` to your web server configuration (see details below).

*Nginx*

Expand All @@ -44,7 +44,7 @@ Nginx config located in `/dist/<locale>/nginx-error-pages.conf` file and can be

# How to improve default pages

* *Extensibility* A new pages can be added by adding new json-files in `scr/<locale>` directory. The page name must follow to format `<HTTP-code>.json` (`<HTTP-code>` is Number, related to specific HTTP status code). You can put any additional data to json-files, that you want to display on a page. In case of common variables, you can use `common.json` file to define them.
* *Extensibility* A new pages can be added by adding new json files in `scr/<locale>` directory. The page name must follow to format `<HTTP code>.json` (`<HTTP code>` is a number, related to specific HTTP status code). You can put any additional data to json files, that you want to display on a page. In case of common variables, you can use `common.json` file to define them.
* *Customization* By editing default theme you can add anything you want. In case if you want to have own page design, you can create a new theme and apply it by editing `config.json` file. All assets (images, fonts, etc) must be placed to `@assets` directory (note: the `@assets` name is used to avoid a naming collision with default assets directory name in common cases). By default the [mustache.js](https://www.npmjs.com/package/mustache) is used as a template engine and [Tailwind](https://tailwindcss.com/) as a CSS framework. Entry point of Tailwind styles must be located in `themes/<name>/@assets/css/main.tcss` file. Custom Tailwind theme settings can be added to `theme.tailwind.config.js` file located in a root of theme directory. Also Tailwind can be disabled by editing `tailwind` option in `config.js`.
* *Localization* If you need to change default text messages, then you can simply edit existing files in`src/<locale>` directory according to your needs. If you want to create your own localization, just simply add new locale directory and create set of source files. After new locale adding, change `locale` property in `config.json` file, located in a root.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "error-pages",
"version": "1.0.1",
"version": "1.0.2",
"description": "Lightweight tool to create static HTTP Error Pages in minimalistic adaptive and accessible design with customization and localization support",
"main": "index.ts",
"scripts": {
Expand Down

0 comments on commit 999b11b

Please sign in to comment.