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 @@
1This is free and unencumbered software released into the public domain. 1Copyright (C) 2026 krazy warez
2 2
3Anyone is free to copy, modify, publish, use, compile, sell, or 3Permission to use, copy, modify, and/or distribute this software for any
4distribute this software, either in source code form or as a compiled 4purpose with or without fee is hereby granted.
5binary, for any purpose, commercial or non-commercial, and by any 5
6means. 6THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 7WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8In jurisdictions that recognize copyright laws, the author or authors 8MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9of this software dedicate any and all copyright interest in the 9ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10software to the public domain. We make this dedication for the benefit 10WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11of the public at large and to the detriment of our heirs and 11ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12successors. We intend this dedication to be an overt act of 12OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13relinquishment in perpetuity of all present and future rights to this
14software under copyright law.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22OTHER DEALINGS IN THE SOFTWARE.
23
24For more information, please refer to <http://unlicense.org/>
README.md deleted −100
@@ -1,100 +0,0 @@
1# hn
2
3hn is a simple front-end alternative for Hacker News, focusing on privacy and
4simplicity.
5
6## Getting Started
7
8These instructions will get you a copy of the project up and running on your
9local machine for development and testing purposes. See deployment for notes on
10how 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
20Install the dependencies, using the web server of your choice:
21
22```
23sudo apt install nginx-full php php-cgi php-fpm minify
24```
25
26Clone the repo:
27
28```
29git clone $repo_url
30```
31
32If you need to minify CSS changes:
33
34```
35# executed in the top-level `hn` dir
36minify -o static/styles.min.css static/styles.css
37```
38
39## Deployment
40
41Deployment is as easy as copying the code to your webroot. No special packages
42or tools required.
43
44To deploy, ensure you have a publicly-available web server and configure it to
45fallback with all errors to the `index.php` file rather than returning a `404`
46error.
47
48For nginx, include the following snippet in your website's conf file:
49
50```conf
51location / {
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
58For Apache, you can include the following snippet in a `.htaccess` file within
59the directory you're serving the PHP file from:
60
61```conf
62FallbackResource /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
74Please read [CONTRIBUTING.md](./CONTRIBUTING.md) and
75[CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for details on our code of
76conduct, and the process for submitting pull requests to us.
77
78### TODO
79
80A 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
91This 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
99This 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
5WHAT
6 front-end alternative for hacker news. php. no tracking.
7
8REQUIRES
9 a web server (nginx or apache), php 8.0+, optional minify.
10
11INSTALL
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
19DEPLOY
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
32BUILT WITH
33 php, html, minify (for css).
34
35TODO
36 - recursive descendant comment threads
37 - polls (ConstructPoll)
38 - pagination / load more
39
40CONTRIBUTING
41 see CONTRIBUTING.txt and CODE_OF_CONDUCT.txt.
42
43VERSIONING
44 none. read the git log.
45
46LICENSE
47 0bsd. see LICENSE.md.
48
49┌──────────────────────────────────────────────────────────────┐
50│ krz.sh │
51└──────────────────────────────────────────────────────────────┘