@@ -6,7 +6,7 @@ Website for tutorials and documentation.
66
77## Get started
88* Run ` npm i ` to install all dependencies
9- * Run ` npm run dev ` to run the projet locally at ` http://localhost:8080 ` , your browser will open the URL automatically
9+ * Run ` npm run dev ` to run the project locally at ` http://localhost:8080 ` , your browser will open the URL automatically
1010
1111## Deploy
1212* Run ` npm run build `
@@ -27,4 +27,38 @@ My code
2727<!-- Some html comment -->
2828```
2929
30+ ### Conversion guide
31+ Guide to convert jsx pages from the old mojs website to markdown.
32+
33+ #### Use find and replace in the file:
34+ - ` <UniteLink link="(.+?)">(.+?)</UniteLink> ` replace with ` [$2]($1) `
35+ - ` <Cite> ` replace with ` > ` (make sure to remove the newline too)
36+ - ` </Cite> ` replace with ``
37+ - ` <span className="highlight">(.+?)</span> ` replace with "` $1 ` "
38+ - ` <div className="post__header">(.+?)</div> ` replace with ` # $1 `
39+ - ` <ORXLine className="post__orx-line" /> ` replace with ` <hr /> `
40+ - ` https://github.com/legomushroom/mojs/blob/master/api/ ` replace with ` /api/ `
41+ - ` <Pen pen="(.+?)" height="(.+?)" /> ` and ` <Pen pen="(.+?)" height="(.+?)"></Pen> ` replace with
42+ ``` html
43+ <Codepen
44+ title =" $1"
45+ pen =" $1"
46+ user =" sol0mka"
47+ height =" $2"
48+ />
49+ [Link to pen](https://codepen.io/sol0mka/pen/$1)
50+ ```
51+ - ` <Gif className="gif--50-width" src="(.+?)" /> ` replace with ` <img src="/assets$1" alt="Example gif" /> `
52+ - ` <CodeSample pen="(.+?)"> ` replace with ` // pen $1 \n```js `
53+ - ` </CodeSample> ` replace with "```"
54+ - ` <Pen (.+?)" height="500</Pen> ` replace with ` <pre><code>$1</code></pre> ` code
55+ - ` <Pen (.+?)</Pen> ` replace with ` <pre><code>$1</code></pre> `
56+
57+ #### Convert to markdown
58+ - Check that you don't have any HTML errors in your file.
59+ - Use an online markdown converter (https://www.browserling.com/tools/html-to-markdown or http://domchristie.github.io/turndown/ )
60+ - Manually remove wrapping divs
61+ - Manually see if there are anything like: `` [Burst](/tutorials/burst/) `` , replace it with ` [ ` Burst` ](/tutorials/burst/) `
62+ - Manually replace all code sample with <MojsDemo code =" the code " penSource =" the codepen id " /> or MojsInteractive element
63+
3064Happy coding with ` mojs ` : tada
0 commit comments