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>
31 lines
988 B
Markdown
31 lines
988 B
Markdown
---
|
|
title: Site URL migration
|
|
---
|
|
|
|
Here is an example on how to move your comments after your posts are moved, from `https://example.org/blog/<slug>` to `https://example.org/post/<slug>` 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 <password> -f var/rules
|
|
```
|
|
|
|
If running in a docker container, the command becomes:
|
|
```sh
|
|
docker ps # to find the container name
|
|
docker exec -it <container> remark42 remap --admin-passwd <password> -f var/rules
|
|
```
|