Total Pageviews

Sunday, 21 April 2024

评论系统Remark42

comment engine

remark42.com 

 Build Status Image Size Go Report Card Coverage Status codecov

Remark42 is a self-hosted, lightweight and simple (yet functional) comment engine, which doesn't spy on users. It can be embedded into blogs, articles, or any other place where readers add comments.

  • Social login via Google, Twitter, Facebook, Microsoft, GitHub, Yandex, Patreon and Telegram
  • Login via email
  • Optional anonymous access
  • Multi-level nested comments with both tree and plain presentations
  • Import from Disqus and WordPress
  • Markdown support with friendly formatter toolbar
  • Moderator can remove comments and block users
  • Voting, pinning and verification system
  • Sortable comments
  • Images upload with drag-and-drop
  • Extractor for recent comments, cross-post
  • RSS for all comments and each post
  • Telegram, Slack, Webhook and email notifications for Admins (get notified for each new comment)
  • Email and Telegram notifications for users (get notified when someone responds to your comment)
  • Export data to JSON with automatic backups
  • No external databases, everything embedded in a single data file
  • Fully dockerized and can be deployed in a single command
  • Self-contained executable can be deployed directly to Linux, Windows and macOS
  • Clean, lightweight and customizable UI with white and dark themes
  • Multi-site mode from a single instance
  • Integration with automatic SSL (direct and via nginx-le)
  • Privacy focused

Demo site available with all authentication methods, including email auth and anonymous access.

Screenshots

All remark42 documentation is available by the link.

Contribution

In order to start and work on the project locally in development mode check our contribution documentation for backend and frontend.

If you are interested in adding a new localization please check these docs.

Related projects

from https://github.com/umputun/remark42

 ----

Installation

Setup Remark42 Instance on Your Server

Installation in Docker

This is the recommended way to run Remark42

  • copy provided docker-compose.yml and customize for your needs
  • make sure you don't keep ADMIN_PASSWD=something... for any non-development deployments
  • pull prepared images from the Docker Hub and start - docker-compose pull && docker-compose up -d
  • alternatively, compile from the sources - docker-compose build && docker-compose up -d

Installation with Binary

  • download archive for the stable release
  • unpack with gunzip (Linux, macOS) or with zip (Windows)
  • run as remark42.{os}-{arch} server {parameters...}, i.e., remark42.linux-amd64 server --secret=12345 --url=http://127.0.0.1:8080
  • alternatively compile from the sources - make OS=[linux|darwin|windows] ARCH=[amd64,386,arm64,arm]

Setup on Your Website

Add config for Remark on a page of your site (here is the full reference):

  • REMARK_URL – the URL where is Remark42 instance is served, passed as REMARK_URL to backend
  • YOUR_SITE_ID - the SITE that you passed to Remark42 instance on start, remark by default.
<script>
var remark_config = {
host: 'REMARK_URL',
site_id: 'YOUR_SITE_ID',
}
</script>

For example:

<script>
var remark_config = {
host: 'https://demo.remark42.com',
site_id: 'remark',
}
</script>

After that place the code snippet right after config.

<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>

Put the next code snippet on a page of your site where you want to have comments:

<div id="remark42"></div>

After that widget will be rendered inside this node.

For more information about frontend configuration please learn about other parameters here
If you want to set this up on a Single Page App, see the appropriate doc page.

Quick installation test

To verify if Remark42 has been properly installed, check a demo page at ${REMARK_URL}/web URL. Make sure to include remark site ID to the ${SITE} list.

Build from the source

  • to build Docker container - make docker. This command will produce container umputun/remark42
  • to build a single binary for direct execution - make OS=<linux|windows|darwin> ARCH=<amd64|386>. This step will produce an executable remark42 file with everything embedded.

from  https://remark42.com/docs/getting-started/installation/

 

 

No comments:

Post a Comment