Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TXTPEN/hn
Embed Hacker News comment tree automatically
https://github.com/TXTPEN/hn
Last synced: 3 months ago
JSON representation
Embed Hacker News comment tree automatically
- Host: GitHub
- URL: https://github.com/TXTPEN/hn
- Owner: TXTPEN
- License: mit
- Created: 2017-05-29T21:27:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-09T05:52:29.000Z (over 7 years ago)
- Last Synced: 2024-04-27T19:34:35.071Z (7 months ago)
- Language: JavaScript
- Homepage: https://txtpen.github.io/hn/
- Size: 157 KB
- Stars: 32
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# embeddable-hn
Embed Hacker News comment tree automatically on your website. Built with [Preact](https://preactjs.com).
## Sites using this plugin
* [rickyhan.com](http://rickyhan.com/blog/k8s.html)
If you want your site featured here, submit a pull request.
## How it works
There is always better discussion on HN than in your Disqus comment box. Instead of a link to HN, you can embed it on your page.
Benefits:
1. Value-add your readers from other sources.
2. Boost site ranking and SEO. (GoogleBot executes JavaScript).
3. Keep discussion on your page.
4. Alternatively, checkout [txtpen](https://txtpen.com) for highlights and inline comments.
This tool queries from `hn.algolia.com/api` so the response time is around ~10ms. It won't slow your page down.
## Basic Usage
1. Embed the javascript file.
a. Put these lines at the top of page before ``
```
```b. Put this after `