Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format md files #1077

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion site/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "always"
"arrowParens": "always",
"overrides": [
{
"files": "*.md",
"options": {
"singleQuote": false
}
}
]
}
23 changes: 12 additions & 11 deletions site/src/docs/backup/url-migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
16 changes: 8 additions & 8 deletions site/src/docs/configuration/email/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
140 changes: 70 additions & 70 deletions site/src/docs/configuration/kubernetes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -104,7 +104,7 @@ metadata:
namespace: remark42
spec:
accessModes:
- ReadWriteOnce
- ReadWriteOnce
resources:
requests:
storage: 10Gi
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions site/src/docs/configuration/notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions site/src/docs/configuration/reproxy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
12 changes: 6 additions & 6 deletions site/src/docs/configuration/subdomain/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -40,8 +40,8 @@ services:
- ./data:/srv/var
logging:
options:
max-size: '10m'
max-file: '1'
max-size: "10m"
max-file: "1"
```

### Nginx configuration
Expand Down
16 changes: 8 additions & 8 deletions site/src/docs/getting-started/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
```

Expand All @@ -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>
```

Expand Down