Commit 32d1cae0e4
32d1cae0e4c8b37aec2fcd58dcc281f16364e6f9
parent: f062c56bf5
Verified · cmc
cmc <hello@cleberg.net> · 2026-08-02 20:29 UTC
convert readme to nfo; convert docs to txt; relicense to 0bsd
Layout: unified · split
CODE_OF_CONDUCT.md → CODE_OF_CONDUCT.txt
renamed
CONTRIBUTING.md → CONTRIBUTING.txt
renamed
LICENSE.md
+12 −24
| @@ -1,24 +1,12 @@ |
| 1 | | This is free and unencumbered software released into the public domain. |
| 2 | | |
| 3 | | Anyone is free to copy, modify, publish, use, compile, sell, or |
| 4 | | distribute this software, either in source code form or as a compiled |
| 5 | | binary, for any purpose, commercial or non-commercial, and by any |
| 6 | | means. |
| 7 | | |
| 8 | | In jurisdictions that recognize copyright laws, the author or authors |
| 9 | | of this software dedicate any and all copyright interest in the |
| 10 | | software to the public domain. We make this dedication for the benefit |
| 11 | | of the public at large and to the detriment of our heirs and |
| 12 | | successors. We intend this dedication to be an overt act of |
| 13 | | relinquishment in perpetuity of all present and future rights to this |
| 14 | | software under copyright law. |
| 15 | | |
| 16 | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 | | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 | | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 19 | | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 20 | | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 21 | | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 22 | | OTHER DEALINGS IN THE SOFTWARE. |
| 23 | | |
| 24 | | For more information, please refer to <http://unlicense.org/> |
| 1 | Copyright (C) 2026 krazy warez |
| 2 | |
| 3 | Permission to use, copy, modify, and/or distribute this software for any |
| 4 | purpose with or without fee is hereby granted. |
| 5 | |
| 6 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 7 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 8 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 9 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 10 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 11 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 12 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
README.md
deleted
−100
| @@ -1,100 +0,0 @@ |
| 1 | | # hn |
| 2 | | |
| 3 | | hn is a simple front-end alternative for Hacker News, focusing on privacy and |
| 4 | | simplicity. |
| 5 | | |
| 6 | | ## Getting Started |
| 7 | | |
| 8 | | These instructions will get you a copy of the project up and running on your |
| 9 | | local machine for development and testing purposes. See deployment for notes on |
| 10 | | how to deploy the project on a live system. |
| 11 | | |
| 12 | | ### Prerequisites |
| 13 | | |
| 14 | | - A web server (e.g., Nginx or Apache) |
| 15 | | - PHP (>= v8.0) |
| 16 | | - Optional: minify |
| 17 | | |
| 18 | | ### Installing |
| 19 | | |
| 20 | | Install the dependencies, using the web server of your choice: |
| 21 | | |
| 22 | | ``` |
| 23 | | sudo apt install nginx-full php php-cgi php-fpm minify |
| 24 | | ``` |
| 25 | | |
| 26 | | Clone the repo: |
| 27 | | |
| 28 | | ``` |
| 29 | | git clone $repo_url |
| 30 | | ``` |
| 31 | | |
| 32 | | If you need to minify CSS changes: |
| 33 | | |
| 34 | | ``` |
| 35 | | # executed in the top-level `hn` dir |
| 36 | | minify -o static/styles.min.css static/styles.css |
| 37 | | ``` |
| 38 | | |
| 39 | | ## Deployment |
| 40 | | |
| 41 | | Deployment is as easy as copying the code to your webroot. No special packages |
| 42 | | or tools required. |
| 43 | | |
| 44 | | To deploy, ensure you have a publicly-available web server and configure it to |
| 45 | | fallback with all errors to the `index.php` file rather than returning a `404` |
| 46 | | error. |
| 47 | | |
| 48 | | For nginx, include the following snippet in your website's conf file: |
| 49 | | |
| 50 | | ```conf |
| 51 | | location / { |
| 52 | | # First attempt to serve request as file, then |
| 53 | | # as directory then fall back to index.php |
| 54 | | try_files $uri $uri/ /index.php?$args; |
| 55 | | } |
| 56 | | ``` |
| 57 | | |
| 58 | | For Apache, you can include the following snippet in a `.htaccess` file within |
| 59 | | the directory you're serving the PHP file from: |
| 60 | | |
| 61 | | ```conf |
| 62 | | FallbackResource /index.php |
| 63 | | ``` |
| 64 | | |
| 65 | | ## Built With |
| 66 | | |
| 67 | | * [PHP](https://www.php.net/) - The scripting language |
| 68 | | * [HTML](https://html.spec.whatwg.org/multipage/) - The markup language |
| 69 | | * [minify](https://github.com/tdewolff/minify/tree/master/cmd/minify) - Used to |
| 70 | | minify CSS |
| 71 | | |
| 72 | | ## Contributing |
| 73 | | |
| 74 | | Please read [CONTRIBUTING.md](./CONTRIBUTING.md) and |
| 75 | | [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for details on our code of |
| 76 | | conduct, and the process for submitting pull requests to us. |
| 77 | | |
| 78 | | ### TODO |
| 79 | | |
| 80 | | A scratch pad of ideas that may be useful to implement: |
| 81 | | |
| 82 | | - [x] Add minimal CSS. |
| 83 | | - [x] Add functionality to view a user's profile. |
| 84 | | - [x] Add functionality to view item-specific page with comments (`ConstructStoryDiscussion`). |
| 85 | | - [ ] Load recursive descendant threads. |
| 86 | | - [ ] Add functionality to handle polls (`ConstructPoll` & `ConstructPollOpt`). |
| 87 | | - [ ] Add functionality to load more items or paginate. |
| 88 | | |
| 89 | | ## Versioning |
| 90 | | |
| 91 | | This project currently doesn't use versioning. See the git log instead. |
| 92 | | |
| 93 | | ## Authors |
| 94 | | |
| 95 | | * **CMC** - *Literally everything* - [Christian Cleberg](https://sr.ht/~Christian Cleberg/) |
| 96 | | |
| 97 | | ## License |
| 98 | | |
| 99 | | This project is licensed under the Unlicense - see the |
| 100 | | [LICENSE.md](./LICENSE.md) file for details. |
README.nfo
added
+51
| @@ -0,0 +1,51 @@ |
| 1 | ┌──────────────────────────────────────────────────────────────┐ |
| 2 | │ H N [ KRZ ] krz.sh │ |
| 3 | └──────────────────────────────────────────────────────────────┘ |
| 4 | |
| 5 | WHAT |
| 6 | front-end alternative for hacker news. php. no tracking. |
| 7 | |
| 8 | REQUIRES |
| 9 | a web server (nginx or apache), php 8.0+, optional minify. |
| 10 | |
| 11 | INSTALL |
| 12 | sudo apt install nginx-full php php-cgi php-fpm minify |
| 13 | git clone $repo_url |
| 14 | |
| 15 | minify css after changes: |
| 16 | |
| 17 | minify -o static/styles.min.css static/styles.css |
| 18 | |
| 19 | DEPLOY |
| 20 | copy the code to your webroot. route all errors to index.php. |
| 21 | |
| 22 | nginx: |
| 23 | |
| 24 | location / { |
| 25 | try_files $uri $uri/ /index.php?$args; |
| 26 | } |
| 27 | |
| 28 | apache (.htaccess): |
| 29 | |
| 30 | FallbackResource /index.php |
| 31 | |
| 32 | BUILT WITH |
| 33 | php, html, minify (for css). |
| 34 | |
| 35 | TODO |
| 36 | - recursive descendant comment threads |
| 37 | - polls (ConstructPoll) |
| 38 | - pagination / load more |
| 39 | |
| 40 | CONTRIBUTING |
| 41 | see CONTRIBUTING.txt and CODE_OF_CONDUCT.txt. |
| 42 | |
| 43 | VERSIONING |
| 44 | none. read the git log. |
| 45 | |
| 46 | LICENSE |
| 47 | 0bsd. see LICENSE.md. |
| 48 | |
| 49 | ┌──────────────────────────────────────────────────────────────┐ |
| 50 | │ krz.sh │ |
| 51 | └──────────────────────────────────────────────────────────────┘ |