Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 `