|
1 | 1 | # Guide to convert jsx pages from the old mojs website to markdown |
| 2 | +In VS Code, use Find and Replace () |
2 | 3 |
|
3 | 4 | ## Use find and replace in the file: |
4 | | - - `UniteLink` replace with `a` |
5 | | - - `a link` replace with `a href` |
6 | | - - `Cite` replace with `blockquote` |
7 | | - - `<span className="highlight">(.+?)<\/span>` replace with `<code>$1</code>` |
8 | | - - `<div className="post__header">(.+?)<\/div>` replace with `<h1>$1</h1>` |
| 5 | + - `<UniteLink link="(.+?)">(.+?)</UniteLink>` replace with `[$2]($1)` |
| 6 | + - `<Cite>` replace with `> ` (make sure to temove the newline too) |
| 7 | + - `</Cite>` replace with `` |
| 8 | + - `<span className="highlight">(.+?)</span>` replace with "`$1`" |
| 9 | + - `<div className="post__header">(.+?)</div>` replace with `# $1` |
9 | 10 | - `<ORXLine className="post__orx-line" />` replace with `<hr />` |
10 | 11 | - `https://github.com/legomushroom/mojs/blob/master/api/` replace with `/api/` |
11 | | - - `<Pen (.+?) />` replace with `<Pen $1></Pen>` |
| 12 | + - `<Pen pen="(.+?)" height="(.+?)" />` and `<Pen pen="(.+?)" height="(.+?)"></Pen>` replace with |
| 13 | + ``` |
| 14 | +<Codepen |
| 15 | + title="$1" |
| 16 | + pen="$1" |
| 17 | + user="sol0mka" |
| 18 | + height="$2" |
| 19 | +/> |
| 20 | +[Link to pen](https://codepen.io/sol0mka/pen/$1) |
| 21 | +``` |
12 | 22 | - `<Gif className="gif--50-width" src="(.+?)" />` replace with `<img src="/assets$1" alt="Example gif" />` |
13 | | - - `<CodeSample` replace with `<pre><code>` |
14 | | - - `</CodeSample>` replace with `</code></pre>` |
| 23 | + - `<CodeSample pen="(.+?)">` replace with `// pen $1 \n```js` |
| 24 | + - `</CodeSample>` replace with "```" |
15 | 25 | - `<Pen (.+?)" height="500</Pen>` replace with `<pre><code>$1</code></pre>` code |
16 | 26 | - `<Pen (.+?)</Pen>` replace with `<pre><code>$1</code></pre>` |
17 | 27 |
|
|
0 commit comments