format md files
- use doublequote in yaml - right indentation in yaml - format missformatted places
This commit is contained in:
+9
-1
@@ -1,5 +1,13 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"arrowParens": "always"
|
||||
"arrowParens": "always",
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.md",
|
||||
"options": {
|
||||
"singleQuote": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,21 +12,22 @@ First you have to create a `rules` file in remark's `/var` folder.
|
||||
|
||||
Format is simply `old_url new_url` like following:
|
||||
|
||||
```
|
||||
https://example.org/old-url-1/ https://example.org/new-url-1/
|
||||
https://example.org/old-url-2/ https://example.org/new-url-2/
|
||||
```
|
||||
```
|
||||
https://example.org/old-url-1/ https://example.org/new-url-1/
|
||||
https://example.org/old-url-2/ https://example.org/new-url-2/
|
||||
```
|
||||
|
||||
### Applying the remap
|
||||
|
||||
After rules file is ready, run the following command:
|
||||
|
||||
```shell
|
||||
remark42 remap --admin-passwd <password> -f var/rules
|
||||
```
|
||||
```shell
|
||||
remark42 remap --admin-passwd <password> -f var/rules
|
||||
```
|
||||
|
||||
If running in a docker container, the command becomes:
|
||||
```shell
|
||||
docker ps # to find the container name
|
||||
docker exec -it <container> remark42 remap --admin-passwd <password> -f var/rules
|
||||
```
|
||||
|
||||
```shell
|
||||
docker ps # to find the container name
|
||||
docker exec -it <container> remark42 remap --admin-passwd <password> -f var/rules
|
||||
```
|
||||
|
||||
@@ -71,14 +71,14 @@ Here is `docker-compose.yml` configuration part spinning up a container for
|
||||
```yaml
|
||||
mailgun:
|
||||
image: stevenolen/mailgun-smtp-server
|
||||
container_name: 'mail'
|
||||
hostname: 'mail'
|
||||
container_name: "mail"
|
||||
hostname: "mail"
|
||||
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: '10m'
|
||||
max-file: '5'
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
|
||||
environment:
|
||||
- MG_KEY=key-123456789
|
||||
@@ -124,14 +124,14 @@ Here is `docker-compose.yml` configuration part spinning up a container for
|
||||
```yaml
|
||||
sendgrid:
|
||||
image: fgribreau/smtp-to-sendgrid-gateway
|
||||
container_name: 'mail'
|
||||
hostname: 'mail'
|
||||
container_name: "mail"
|
||||
hostname: "mail"
|
||||
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: '10m'
|
||||
max-file: '5'
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
|
||||
environment:
|
||||
- SENDGRID_API=key-123456789
|
||||
|
||||
@@ -35,67 +35,67 @@ spec:
|
||||
app: remark42
|
||||
spec:
|
||||
containers:
|
||||
- name: remark42
|
||||
image: umputun/remark42:v1.8.1
|
||||
ports:
|
||||
# http:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: REMARK_URL
|
||||
value: "https://comments.mysite.com/"
|
||||
- name: "SITE"
|
||||
value: "mysite.com"
|
||||
- name: SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: SECRET
|
||||
- name: STORE_BOLT_PATH
|
||||
value: "/srv/var/db"
|
||||
- name: BACKUP_PATH
|
||||
value: "/srv/var/backup"
|
||||
- name: AUTH_GOOGLE_CID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GOOGLE_CID
|
||||
- name: AUTH_GOOGLE_CSEC
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GOOGLE_CSEC
|
||||
- name: AUTH_GITHUB_CID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GITHUB_CID
|
||||
- name: AUTH_GITHUB_CSEC
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GITHUB_CSEC
|
||||
- name: ADMIN_SHARED_ID
|
||||
value: "google_b182b5daa0004104b348d9bde762b1880ed9d98d"
|
||||
- name: TIME_ZONE
|
||||
value: "Europe/Dublin"
|
||||
volumeMounts:
|
||||
- name: srvvar
|
||||
mountPath: /srv/var
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "25Mi"
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: "1Gi"
|
||||
- name: remark42
|
||||
image: umputun/remark42:v1.8.1
|
||||
ports:
|
||||
# http:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: REMARK_URL
|
||||
value: "https://comments.mysite.com/"
|
||||
- name: "SITE"
|
||||
value: "mysite.com"
|
||||
- name: SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: SECRET
|
||||
- name: STORE_BOLT_PATH
|
||||
value: "/srv/var/db"
|
||||
- name: BACKUP_PATH
|
||||
value: "/srv/var/backup"
|
||||
- name: AUTH_GOOGLE_CID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GOOGLE_CID
|
||||
- name: AUTH_GOOGLE_CSEC
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GOOGLE_CSEC
|
||||
- name: AUTH_GITHUB_CID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GITHUB_CID
|
||||
- name: AUTH_GITHUB_CSEC
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: remark42
|
||||
key: AUTH_GITHUB_CSEC
|
||||
- name: ADMIN_SHARED_ID
|
||||
value: "google_b182b5daa0004104b348d9bde762b1880ed9d98d"
|
||||
- name: TIME_ZONE
|
||||
value: "Europe/Dublin"
|
||||
volumeMounts:
|
||||
- name: srvvar
|
||||
mountPath: /srv/var
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "25Mi"
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: "1Gi"
|
||||
securityContext:
|
||||
# Has its own root privilege drop. Can't do runAsUser / runAsGroup.
|
||||
volumes:
|
||||
- name: srvvar
|
||||
persistentVolumeClaim:
|
||||
claimName: remark42
|
||||
- name: srvvar
|
||||
persistentVolumeClaim:
|
||||
claimName: remark42
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -104,7 +104,7 @@ metadata:
|
||||
namespace: remark42
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -135,18 +135,18 @@ metadata:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- comments.mysite.com
|
||||
secretName: comments-tls
|
||||
- hosts:
|
||||
- comments.mysite.com
|
||||
secretName: comments-tls
|
||||
rules:
|
||||
- host: "comments.mysite.com"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: remark42-web
|
||||
servicePort: 8080
|
||||
- host: "comments.mysite.com"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: remark42-web
|
||||
servicePort: 8080
|
||||
```
|
||||
|
||||
Change `storageClassName` if you run on top of different cloud / bare metal.
|
||||
|
||||
@@ -16,7 +16,7 @@ In order to integrate notifications from remark42 with the [slack](https://slack
|
||||
2. Click the OAuth & Permissions tab in the left sidebar.
|
||||
3. Below Bot Token Scopes, select the `chat:write`, `chat:write.public` and `channels:read` scopes. Then click Add an OAuth Scope.
|
||||
4. Scroll to the top of the page, and click on Install to workspace.
|
||||
5. You should see the "_View basic information about public channels in your workspace_", "_Send Message as ..._" and "_Send messages to channels ... isn't a member of_" as the permission, then click allow.
|
||||
5. You should see the "_View basic information about public channels in your workspace_", "_Send Message as ..._" and "_Send messages to channels ... isn't a member of_" as the permission, then click allow.
|
||||
6. You can then see you token, in the form of `xoxb-...-...-...`
|
||||
|
||||
### Remark42 configuration
|
||||
@@ -38,15 +38,16 @@ By default, the notification are sent to the `general` channel on slack. If you
|
||||
If all goes fine, you should be able to see the following message on your Slack notification channel:
|
||||
|
||||
> New comment from _author_ -> _original author_
|
||||
>> [Demo | Remark42](http://127.0.0.1:8080/web/#remark42__comment-11288987987)
|
||||
>> This is the comment written by _author_
|
||||
|
||||
>
|
||||
> > [Demo | Remark42](http://127.0.0.1:8080/web/#remark42__comment-11288987987)
|
||||
> > This is the comment written by _author_
|
||||
|
||||
## Telegram
|
||||
|
||||
### Telegram notifications for administrators
|
||||
|
||||
In order to integrate notifications about any comment on your sites with remark42 with [telegram](https://telegram.org)
|
||||
|
||||
1. Set `NOTIFY_ADMINS=telegram`
|
||||
1. Make [a channel](https://telegram.org/faq_channels) and add it to remark42 configuration as `NOTIFY_TELEGRAM_CHAN`
|
||||
1. Get a token according to the instruction below and add it to the configuration as well
|
||||
|
||||
@@ -82,7 +82,7 @@ services:
|
||||
labels:
|
||||
reproxy.server: remark42.example.com
|
||||
reproxy.port: "8080"
|
||||
reproxy.route: '^/(.*)'
|
||||
reproxy.dest: '/$$1'
|
||||
reproxy.ping: '/ping'
|
||||
reproxy.route: "^/(.*)"
|
||||
reproxy.dest: "/$$1"
|
||||
reproxy.ping: "/ping"
|
||||
```
|
||||
|
||||
@@ -14,9 +14,9 @@ All README examples show configurations with remark42 on its own subdomain, i.e.
|
||||
- The backend `REMARK_URL` parameter will be `https://example.com/remark42`
|
||||
|
||||
- And you also need to slightly modify the callback URL for the social media login API's:
|
||||
- Facebook Valid OAuth Redirect URIs: `https://example.com/remark42/auth/facebook/callback`
|
||||
- Google Authorized redirect URIs: `https://example.com/remark42/auth/google/callback`
|
||||
- GitHub Authorised callback URL: `https://example.com/remark42/auth/github/callback`
|
||||
- Facebook Valid OAuth Redirect URIs: `https://example.com/remark42/auth/facebook/callback`
|
||||
- Google Authorized redirect URIs: `https://example.com/remark42/auth/google/callback`
|
||||
- GitHub Authorised callback URL: `https://example.com/remark42/auth/github/callback`
|
||||
|
||||
### docker-compose configuration
|
||||
|
||||
@@ -25,7 +25,7 @@ Both Nginx and Caddy configuration below relies on remark42 available on hostnam
|
||||
Example `docker-compose.yaml`:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
version: "2"
|
||||
services:
|
||||
remark42:
|
||||
image: umputun/remark42:latest
|
||||
@@ -40,8 +40,8 @@ services:
|
||||
- ./data:/srv/var
|
||||
logging:
|
||||
options:
|
||||
max-size: '10m'
|
||||
max-file: '1'
|
||||
max-size: "10m"
|
||||
max-file: "1"
|
||||
```
|
||||
|
||||
### Nginx configuration
|
||||
|
||||
@@ -28,10 +28,10 @@ Add config for Remark on a page of your site:
|
||||
|
||||
```html
|
||||
<script>
|
||||
const remark_config = {
|
||||
host: 'REMARK_URL',
|
||||
site_id: 'YOUR_SITE_ID',
|
||||
}
|
||||
const remark_config = {
|
||||
host: 'REMARK_URL',
|
||||
site_id: 'YOUR_SITE_ID',
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
@@ -42,10 +42,10 @@ For example:
|
||||
|
||||
```html
|
||||
<script>
|
||||
const remark_config = {
|
||||
host: 'https://demo.remark42.com',
|
||||
site_id: 'remark',
|
||||
}
|
||||
const remark_config = {
|
||||
host: 'https://demo.remark42.com',
|
||||
site_id: 'remark',
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user