Files
remark42/site/src/docs/getting-started/installation/index.md
T
dfcf728e6f Site (#1049)
by @akellbl4 

* create infrastructure for site

* wip

* fix docker build and add readme

* add docker-compose as a build and a run method

* rename compose file yaml -> yml

* add `src` as volume for watching changes

* update configs

* update README

* add padding at the end of the pages

* move demo settings in config

* fetch latest release from github

* update docs navigation

- add sections
- redirect from root of the section to first doc
- nice styles for navigation
- add brand colors

* cache github data from first load

* add redirects and fix link to docs

* fix docs nav styles

* add installation page placeholder

* fix demo

* add 404

* add dark theme, add theme switcher, remove unused files

* fix dark theme on main page

* fix dark theme background

* fix node version

* change installation docs

* add note block

* minor fixes

* add code highlighting styles

* fixes

* fixes

* mobile navigation, fix code highlighting colors

* fix dev server

* fix fetching error

* fix path to edit

Co-authored-by: Pavel Mineev <pavel@mineev.me>
Co-authored-by: Dmitry Verkhoturov <paskal.07@gmail.com>
2021-06-13 18:44:49 -05:00

2.4 KiB
Raw Blame History

title, parent, order
title parent order
Installation Getting Started 100

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 DockerHub 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 stable release or development version
  • 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:

<script>
	const remark_config = {
		host: 'REMARK_URL',
		site_id: 'YOUR_SITE_ID',
	}
</script>
  • REMARK_URL the URL where is Remark42 instance is served.
  • YOUR_SITE_ID - the ID that you passed to Remark42 instance on start.

For example:

<script>
	const 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>

::: note 💡 Note that: You can place the config with the snippet in any place of the HTML code of your site. If it closer to start of the HTML (for example in <head>) it will start loading sooner and show comments faster. :::

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.

If you want to set this up on a Single Page App, see appropriate doc page.