Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Website for mojs tutorials and documentation

License

NotificationsYou must be signed in to change notification settings

mojs/mojs.github.io

Repository files navigation

Website for tutorials and documentation.

mo · js

Get started

  • Runnpm i to install all dependencies
  • Runnpm run dev to run the project locally athttp://localhost:8080, your browser will open the URL automatically

Deploy

  • Runnpm run build
  • Try the build locally usingnpx serve docs/.vuepress/dist
  • Automatic deployment through Github Actions on themain branch

Tips for docs writers

If you need very special demo that doesn't work with the<MojsCode> or theMojsInteractive 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.

Known bugs

  • If you get anUnknown custom element or any other weird errors, try restarting VuePress by stopping the process in your terminal, then runnpm 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 anErrors 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-->

Conversion guide

Guide to convert jsx pages from the old mojs website to markdown.

Use find and replace in the file:

  • <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
<Codepentitle="$1"pen="$1"user="sol0mka"height="$2"/>[Link to pen](https://codepen.io/sol0mka/pen/$1)
  • <Gif className="gif--50-width" src="(.+?)" /> replace with<img src="/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>

Convert to markdown

Happy coding withmojs 🎉


[8]ページ先頭

©2009-2025 Movatter.jp