From 3111c0e72247f289050e905569ce35d59fac464e Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 6 Dec 2020 20:02:42 +0100 Subject: [PATCH 1/2] fix formatting for email templating doc --- docs/latest/developers-guide/email-templates.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/latest/developers-guide/email-templates.md b/docs/latest/developers-guide/email-templates.md index bf9bddff..72c32c7b 100644 --- a/docs/latest/developers-guide/email-templates.md +++ b/docs/latest/developers-guide/email-templates.md @@ -1,9 +1,10 @@ -### Email templating +--- +title: Email templating +--- -We use golang templates for email templating. -templates located in `backend/templates` and embedded into binary by statik +Remark42 uses golang templates for email templating. Templates are located in `backend/templates` and embedded into binary by statik -For getting access to files you can use package `templates` from `backend/app/templates` +For getting access to the files you can use package `templates` from `backend/app/templates` Now we have following templates: - `email_confirmation_login.html.tmpl` – used for confirmation of login From d0d09604e1e958dce9fd2a4067eff77e5c9ecb29 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 6 Dec 2020 20:08:26 +0100 Subject: [PATCH 2/2] add remap doc by @mind-overflow #810 --- docs/1.6/migration.md | 30 ++++++++++++++++++++++++++++++ docs/latest/migration.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 docs/1.6/migration.md create mode 100644 docs/latest/migration.md diff --git a/docs/1.6/migration.md b/docs/1.6/migration.md new file mode 100644 index 00000000..cd842824 --- /dev/null +++ b/docs/1.6/migration.md @@ -0,0 +1,30 @@ +--- +title: Site URL migration +--- + +Here is an example on how to move your comments after your posts are moved, from `https://example.org/blog/` to `https://example.org/post/` in that example. + +### Rules file + +First you have to create a `rules` file in remark's `/var` folder. + +[Here is the test](https://github.com/akosourov/remark/blob/4dc123dbe84f4f248864bcdbbd6cc2b3a4dafe11/backend/app/migrator/mapper_test.go#L13-L17) with an example of rules file syntax, 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/ +``` + +### Applying the remap + +After rules file is ready, run the following command: + +```sh +remark42 remap --admin-passwd -f var/rules +``` + +If running in a docker container, the command becomes: +```sh +docker ps # to find the container name +docker exec -it remark42 remap --admin-passwd -f var/rules +``` diff --git a/docs/latest/migration.md b/docs/latest/migration.md new file mode 100644 index 00000000..cd842824 --- /dev/null +++ b/docs/latest/migration.md @@ -0,0 +1,30 @@ +--- +title: Site URL migration +--- + +Here is an example on how to move your comments after your posts are moved, from `https://example.org/blog/` to `https://example.org/post/` in that example. + +### Rules file + +First you have to create a `rules` file in remark's `/var` folder. + +[Here is the test](https://github.com/akosourov/remark/blob/4dc123dbe84f4f248864bcdbbd6cc2b3a4dafe11/backend/app/migrator/mapper_test.go#L13-L17) with an example of rules file syntax, 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/ +``` + +### Applying the remap + +After rules file is ready, run the following command: + +```sh +remark42 remap --admin-passwd -f var/rules +``` + +If running in a docker container, the command becomes: +```sh +docker ps # to find the container name +docker exec -it remark42 remap --admin-passwd -f var/rules +```