Commit 7f4dbdb90d
Unsigned
Layout: unified · split
README.md +24 −2
| @@ -1,5 +1,27 @@ | |||
| 1 | # hn | 1 | # hn |
| 2 | 2 | ||
| 3 | [hn](https://hn.cleberg.net) is a simple front-end alternative for Hacker News. | 3 | [hn](https://hn.cleberg.net) is a simple front-end alternative for Hacker News. |
| 4 | hn focuses on the links shared on Hacker News, currently leaving out an options | 4 | hn focuses on simplicity and privacy. |
| 5 | to login or view comments. | 5 | |
| 6 | ## Development | ||
| 7 | |||
| 8 | To deploy, ensure you have a publicly-available web server and configure it to | ||
| 9 | fallback with all errors to the `index.php` file rather than returning a `404` | ||
| 10 | error. | ||
| 11 | |||
| 12 | For nginx, include the following snippet in your website's conf file: | ||
| 13 | |||
| 14 | ```conf | ||
| 15 | location / { | ||
| 16 | # First attempt to serve request as file, then | ||
| 17 | # as directory then fall back to index.php | ||
| 18 | try_files $uri $uri/ /index.php?$args; | ||
| 19 | } | ||
| 20 | ``` | ||
| 21 | |||
| 22 | For Apache, you can include the following snippet in a `.htaccess` file within | ||
| 23 | the directory you're serving the PHP file from: | ||
| 24 | |||
| 25 | ```conf | ||
| 26 | FallbackResource /index.php | ||
| 27 | ``` | ||