Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

bellroy/elm-actor-framework-template-markdown

Repository files navigation

Elm Actor Framework - Template - Markdown

Build Status Elm package

This package is as an extension of the Elm Actor Framework Package.

Demo

Turn your markdown templates into Html or any other output enriched by your Actors.

import Framework.Template.Markdown exposing (MarkdownTemplate, blank, parse)


type Actors
    = Editor
    | Layout
    | Counter


components : Components Actors
components =
    Components.fromList
        [ Component.make
            { actor = Counter
            , nodeName = "counter-component"
            }
        , Component.make
            { actor = Counter
            , nodeName = "COUNTER"
            }
        ]


template : String
template =
    """
## A Markdown Example

Lorem **ipsum** dolor sit *amet* ...

- [x] list item
- [ ] more dummy content

---

Render an actor here!

<counter-component steps="10" value="10" ></counter-component> 

And another one:

<!COUNTER 100:25 >

"""


markdownTemplate : MarkdownTemplate Actors
markdownTemplate =
    parse components template
        |> Result.withDefault blank

In progress

  • tables

Templates

Actors make up ideal components that can be used on a template.

This module uses a shared type from the Elm Actor Framework -Templates package. The goal of these packages is to be able to provide different parsers and renderers.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages