Code Monkey home page Code Monkey logo

commentoplusplus's Introduction

Commento++

๐Ÿ’ฌ Try it out and deploy your own

LIVE DEMO

Deploy

โ“ About

Commento++ is a free, open source, fast & lightweight comments box that you can embed in your static website instead of Disqus.

โšก Features

  • Markdown support
  • Import from Disqus
  • Voting
  • Automated spam detection (Askimet integration)
  • Moderation tools
  • Sticky comments
  • Thread locking
  • OAuth login (Google, Github, Twitter) and single sign-on
  • Hot-reloading of comments
  • Email notifications.

๐Ÿค Support

Please (donate) if you find my work helpful (this will always remain free and open source)!

๐Ÿ“ท Screenshots

Commento++ in action

๐Ÿค” How is this different from Disqus, Facebook Comments, and the rest?

  • ๐Ÿฑโ€๐Ÿ‘ค Respects your privacy and no adverts
  • ๐Ÿ’„ Prettier comments box compared to other FOSS alternatives
  • โšก Orders of magnitude lighter and faster than alternatives
  • ๐Ÿ• One click to deploy your own instance to a free Heroku account in seconds
  • ๐Ÿ”Œ You can self-host too for maximum control!

Get started

To start you just need to launch an instance. The button below will work for a free Heroku account:

Deploy

Otherwise, most of the below is the same as documented at https://docs.commento.io

If you want to self-host, you will need a PostgreSQL server handy and then:

  1. Use this repo's Dockerfile if you're into that kind of thing
  2. Download the plug and play pre-compiled version from the releases
  3. To build yourself, you can clone this repo (you will require nodejs, yarn, golang installed) and run make prod and you will generate ./build/prod/commento

To launch, you should configure the following environment variables below:

$ export COMMENTO_ORIGIN=http://commento.example.com:8080
$ export COMMENTO_PORT=8080
$ export COMMENTO_POSTGRES=postgres://username:[email protected]:5432/commento?sslmode=disable
$ export COMMENTO_CDN_PREFIX=$COMMENTO_ORIGIN

And then you can run the commento binary.

Docker setup

Alternatively you can use the pre-build images from:

Instructions for configuring the docker image can be found here. Are you missing a version? Please contact @caroga here.

Finally

Once you have created an account in your commento instance, it should give you instructions on how to embed this into your site! It should be as simple as:

<script defer src="https://(server url)/js/commento.js"></script>
<div id="commento"></div>

If you're running this behind nginx/another reverse proxy

Remember to either forward the websockets through to commento in your nginx config, e.g.:

location / {
    proxy_pass http://commento;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}

Or if you'd rather not do that, disable websockets in favour of HTTP polling by adding data-no-websockets="true" to the commento <script> tag (or `data-no-livereload="true"`` to only load comments on page load, see below!)

More options to configure commento's frontend

You can add the following to commento's script tag:

  • data-css-override="http://server/styles.css" - A URL to a CSS file with overriding styles. Defaults to no override and uses Commento's default theme.
  • data-auto-init="false" - Commento automatically initialises itself when the page is loaded. If you prefer to load Commento dynamically (for example, after the user clicks a button), you can disable this. You will be required to call window.commento.main() when you want to load Commento. By default, this is true.
  • data-id-root="notcommento" - By default, Commento looks for a <div> with id="commento". If you want to load Commento in a different element, you can set this attribute to the ID of that element.
  • data-no-fonts="true" - By default, Commento uses the Source Sans Pro font to present a good design out-of-the-box. If you'd like to disable this so that Commento never loads the font files, you can set this to true. By default, this is true.
  • data-hide-deleted - By default, deleted comments with undeleted replies are shown with a "[deleted]" tag. If you'd like to disable this, setting this to true will hide deleted comments even if there are legitimate replies underneath. Deleted comments without any undeleted comments underneath are hidden irrespective of the value of this function. By default, this is false.
  • data-no-websockets="true" - Disables websocket functionality in favour of HTTP polling to have the same live reload functionality in a situation where websockets aren't allowed (e.g. a reverse proxy)
  • data-no-livereload="true" - Disabled all hot reload functionality (this supercedes the above flag) - all comments are loaded once and only once on page load.

e.g. Usage example:

<script defer src="https://chat.mookerj.ee/js/commento.js" data-no-websockets="true"></script>

How is this different to the original Commento?

Original source is from @adtac at https://gitlab.com/commento/commento/ - this fork is largely a result of me getting carried away fixing a lot of bugs but the original maintainer seemingly disappearing!

(Inconclusive) list of changes from upstream:

I've sent in merge requests for a lot of the above but I don't know when they'll be accepted, so here's a ready to use version with all batteries included to help out fellow bloggers!

commentoplusplus's People

Contributors

adtac avatar souramoo avatar daftaupe avatar linevych avatar caroga avatar cruzdanilo avatar pawurb avatar xphoniex avatar rickypanzer avatar fidiego avatar dplanella avatar hypertesto avatar spookey avatar jybp avatar nebulade avatar evilworm avatar batyshkalenin avatar xani avatar b-m-f avatar wgh- avatar kerumen avatar atagulalan avatar daszgfz avatar evalphobia avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.