Website for tutorials and documentation.
npm i
to install all dependenciesnpm run dev
to run the project locally at http://localhost:8080
, your browser will open the URL automaticallynpm run build
npx serve docs/.vuepress/dist
main
branchIf you need very special demo that doesn't work with the <MojsCode>
or the MojsInteractive
components, create a new one and add it to the "components" folder. Make sure the name doesn't contain a number, VuePress doesn't like that.
If you get an Unknown custom element
or any other weird errors, try restarting VuePress by stopping the process in your terminal, then run npm run dev
again to clear the VuePress cache. It's probably due to some JS error in a custom component that you used to wrote.
If you get an Errors compiling template: tag <p> has no matching end tag.
error, make sure you have a double line break before any HTML comments (<!--
), like this:
My code
<!-- Some html comment -->
Guide to convert jsx pages from the old mojs website to markdown.
<UniteLink link="(.+?)">(.+?)</UniteLink>
replace with [$2]($1)
<Cite>
replace with >
(make sure to remove the newline too)</Cite>
replace with ``<span className="highlight">(.+?)</span>
replace with "$1
"<div className="post__header">(.+?)</div>
replace with # $1
<ORXLine className="post__orx-line" />
replace with <hr />
https://github.com/legomushroom/mojs/blob/master/api/
replace with /api/
<Pen pen="(.+?)" height="(.+?)" />
and <Pen pen="(.+?)" height="(.+?)"></Pen>
replace with
<Codepen
title="$1"
pen="$1"
user="sol0mka"
height="$2"
/>
[Link to pen](https://codepen.io/sol0mka/pen/$1)
<Gif className="gif--50-width" src="https://github.com/mojs/mojs.github.io/raw/source/(.+?)" />
replace with <img src="https://github.com/mojs/mojs.github.io/raw/source/assets$1" alt="Example gif" />
<CodeSample pen="(.+?)">
replace with // pen $1 \n```js
</CodeSample>
replace with "```"<Pen (.+?)" height="500</Pen>
replace with <pre><code>$1</code></pre>
code<Pen (.+?)</Pen>
replace with <pre><code>$1</code></pre>
[Burst](/tutorials/burst/)
, replace it with [
Burst](/tutorials/burst/)
Happy coding with mojs
:tada: