Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kiranandcode/simple-pleroma-comments

Free, open source web commenting system in a single script (no-analytics, privacy friendly)!
https://github.com/kiranandcode/simple-pleroma-comments

activitypub comments comments-system ocaml pleroma privacy

Last synced: 8 days ago
JSON representation

Free, open source web commenting system in a single script (no-analytics, privacy friendly)!

Awesome Lists containing this project

README

        

# Pleroma Comments
*Privacy respecting FOSS comments system for static webpages.*

![pleroma-comments-example-image](https://github.com/Gopiandcode/pleroma-comments/raw/master/example.png)

Having comments can be a great way to spice up a blog or personal
site, however most popular solutions for online comments (looking at
you Disqus) are proprietary non-free privacy-disrespecting ~~pieces of
trash~~ *ahem* software.

## Dependencies
I *hate* Javascript and refuse to write a single line of that godforsaken language.

As such, this plugin is actually built by transpiling from `Ocaml`.

To build the plugin, you'll need the following dependencies:
`
core_kernel
base
js_of_ocaml-tyxml
js_of_ocaml
js_of_ocaml-lwt
cohttp
cohttp-lwt-jsoo
lwt
yojson
`
All of these can be installed from opam using `opam install `.

## Building
To build the plugin:

1. open the `pleroma_comments.ml` file and edit:
- `instance_url` - to your home pleroma instance (default: "https://mastadon.social.com")
- `base_comment_id` - the id of the element that pleroma-comments will as the insertion point (default: "comments")
- `reply_icon_url` - icon of reply

2. run `opam build ./pleroma_comments.js`

3. exported javascript can be found at `./_build/default/pleroma_comment.js`

4. (optional) open `./_build/default/index.html` to test whether the package works (you may need to modify the comment id).

## Usage
The idea of this plugin builds on the idea presented in this
[blog-post](https://ecmelberk.com/fediverse-comments.html) by Ecmel
Berk Canlıer.

When you want to support comments for a blog or page, first share the
page on the fediverse in dedicated post. Pleroma-comments will then
read any responses to this post and pretty print them on the base html
page.

Assuming you've made a post on the Fediverse, and have since found your post's id.

Simply add the script to your server (also update your [JS-licences](https://www.gnu.org/licenses/javascript-labels.html) to mention it's FOSS), and load the script in the head of your page:
```

```

When you want comments, place a div into your static page - the only contents of the div should be the ID of your post.
```

9x4Lf0vc7HBztCRDfM

```

On loading the page, pleroma-comments will replace this element with html representing the comments:
```






Response to first post.


Posted on07:44, 2nd of Jun, 2020








Nested response to response to first post.
#tagged


Posted on13:10, 2nd of Jun, 2020







reply



```
Style as you need.