imba / imba.io

📄The official website of Imba
http://imba.io
MIT License
80 stars 37 forks source link

Imba.io

Imba's official website and documentation.

Contributing

Contributions are highly appreciated. The easiest way to contribute to the documentation is by editing /content/docs/undocumented.md.

This includes:

For big changes it's best to ask first. You can reach out to us on Discord or create an issue here on Github. We don't bite!

Installation

Fork the repository, then:

git clone https://github.com/your-fork/imba.io
cd imba.io
npm i
npm run dev

Contributing Guide

Adding Documentation

You can find the main documentation in /content/docs/.

See our proprietary markdown syntax guide below.

Adding API Reference Examples

To add your own example, add it to /content/examples/api/.

The API docs are unique in that they are automatically included as examples for any of the language constructs they use.

So, if you add an example that contains @intersect.in, you don't have to do anything special, the build scripts will automatically include your example on the @intersect.in API reference page, and on the pages of any other constructs your example uses.

Editing The Navbar

The navbar is parsed from the markdown in /content/nav.md. Just copy the formatting used for other documents. Your markdown page must start with an h1 such as # Hello.

Markdown Syntax

We've added some proprietary markdown syntax, especially to help with code snippets. The code that parses snippets and related options can be found in src/components/app-code.imba

Options

You can specify options by placing a comment on the first line of an imba snippet. Multiple options can be specified.

```imba
# [preview=md] [windowed] [titlebar] [title=Test]
console.log "code goes here"

Available options are:

- App previews
# [preview=md]
```
This will show a preview of the app under your snippet.
Available preview sizes are `sm`, `md`, `lg`, and `xl`.