You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/updating-legacy-docs/converting-rst-to-md.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -59,12 +59,19 @@ Once the work is done, submit a PR to merge it into the main branch.
59
59
```sh
60
60
sphinx-build -M markdown ./docs ./build
61
61
```
62
-
2. For simplicity, we're going to merge these files from `./build/markdown`/ straight into `./docs/`, so that all of each subfolder's .rst files sit alongside their .md files
63
-
- Move all files from `./build/markdown/` into `./docs/`
64
-
3. Delete the `./build/` folder, as it won't be needed
65
-
4. Rename `./docs/index.md` to `./docs/_nav.md`
62
+
- This will generate .md files within `./build/markdown`
63
+
2. We want to replace all of the .rst files with the .md files, *however*if we simply delete the .rst and add the .md we will lose all of the git history!
64
+
- To get around this, we're going to first *rename* all of the .rst files to .md, and *then* overwrite the "fake" renamed .md files with the converted .md files
65
+
3. Using your renamer tool of choice, rename all .rst files in docs/ to the .md extension
66
+
4. **Commit this rename change!**
67
+
- Be careful not to commit anything in `./build/`, as we don't want these in the repo (yet)
68
+
5. Now, overwrite all `./docs/` .md files with those from `./build/markdown/`
69
+
6. Delete the `./build/` folder, as it won't be needed
70
+
7. Rename `./docs/index.md` to `./docs/_nav.md`
66
71
- This is a temporary process that we'll resolve later
67
72
- It needs to be rewritten in a different format, and moved into `./mkdocs.yml`, with this file deleted
73
+
8. **Commit this overwrite change!**
74
+
- This solidifies the history, at which point we can start cleanup
68
75
69
76
---
70
77
@@ -112,6 +119,7 @@ Instead of initializing Mkdocs from scratch, we're going to just copy files over
112
119
- Using regex, search for `“|”` and replace with `"`
113
120
- Using regex, search for `‘|’` and replace with `'`
114
121
- Using regex, search for`–` and replace with `-`
122
+
- Search for`…` and replace with `...`
115
123
5. Update offset sublist settings
116
124
- Using regex, search for`(\n|\r) : - ` and replace with `:\n - ` – only seems to be an issue with changelog
0 commit comments