vesta

Version, currently 0.2.04 versions

github.com/ruivieira/crystal-vesta

Crystal executable Markdown

6 stars
0 dependents
License: AGPL3

Nothing has been indexed for 0.2.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  vesta:
    github: ruivieira/crystal-vesta
    version: ~> 0.2.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.2.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

[![tests](https://github.com/ruivieira/crystal-vesta/actions/workflows/main.yml/badge.svg)](https://github.com/ruivieira/crystal-vesta/actions/workflows/main.yml) [![builds.sr.ht status](https://builds.sr.ht/~ruivieira/crystal-vesta/commits/.build.yml.svg)](https://builds.sr.ht/~ruivieira/crystal-vesta/commits/.build.yml?)

# crystal-vesta

![vesta](./docs/vesta.png)

Crystal executable Markdown.

## installation

Add the dependency to your `shard.yml`:

```yaml
dependencies:
  holst:
    github: ruivieira/crystal-vesta
```

and run `shards install`.

### command line

To install the CLI, clone this repository and run

```shell
crystal build vestacli.cr
```

The basic usage to render a markdown file `foo.md` is

```shell
vestacli -i foo.md -o bar.md
```

## examples

Given a Markdown file with `crystal` code block, _e.g._

    # Title

    This is a test, and with
    a code block (`Crystal`)

    ```crystal
    a = [1, 2, 3]
    b = a.map{ |x| x*2 }
    b
    ```

    Let's try with another one

    ```crystal
    c = 4
    c
    ```

    And ... the end.

`vesta` will execute the code block and add the result after the block:

```crystal
require "vesta"

vesta = Vesta::Renderer.new("test_file.md")
result = vesta.render
```

will result in:

    # Title

    This is a test, and with a code block (`Crystal`)

    ``` crystal
    a = [1, 2, 3]
    b = a.map{ |x| x*2 }
    b
    ```

        [2, 4, 6]

    Let's try with another one

    ``` crystal
    c = 4
    c
    ```

    ```
    4
    ```

    And ... the end.

## documentation

API documentation is available [here](https://ruivieira.github.io/crystal-vesta/).

A git mirror is available at [https://git.sr.ht/~ruivieira/crystal-vesta](https://git.sr.ht/~ruivieira/crystal-vesta).

## mailing lists

- Announcements: [https://lists.sr.ht/~ruivieira/crystal-announce](https://lists.sr.ht/~ruivieira/crystal-announce)
- Discussion: [https://lists.sr.ht/~ruivieira/crystal-discuss](https://lists.sr.ht/~ruivieira/crystal-discuss)
- Development: [https://lists.sr.ht/~ruivieira/crystal-devel](https://lists.sr.ht/~ruivieira/crystal-devel)

Please prefix the subject with `[crystal-vesta]`.