# Expug

> Indented shorthand HTML templates for Elixir

Expug is a template language based on [Pug][] (formerly known as [Jade][]).
This is a work-in-progress.

[![Status](]( "See test builds")


## Installation

Add expug to your list of dependencies in `mix.exs`:

def deps do
  #[{:expug, "~> 0.0.1"}]
  [{:expug, git: ""}]

Also see [phoenix_expug]( for Phoenix integration.

## The language

Expug lets you write HTML as indented shorthand, inspired by Haml, Slim, Pug/Jade, and so on.

doctype html
  title Hello, world!
    | This is a link

Also see:

- [Comparison with Pug](docs/
- [Jade language reference]( (

## Prior art

There's [calliope] and [slime] that brings Haml and Slim to Elixir, respectively. Expug offers a bit more:

- Jade syntax! - something I personally find more sensible than Slim.
- True multilines - Expug has a non-line-based tokenizer that can figure out multiline breaks.
- Correct line number errors - Errors in Expug will always map to the correct source line numbers.


## How it works

Expug converts a `.pug` template into an EEx string:

iex> Expug.to_eex!(~s[div(role="alert")= @message])
"<div role=<%= raw(\"alert\") %>><%= @message %>"

See the module `Expug` for details.

To use Expug with Phoenix, see [phoenix_expug](

## Thanks

**expug** © 2016+, Rico Sta. Cruz. Released under the [MIT] License.<br>
Authored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).

> []( &nbsp;&middot;&nbsp;
> GitHub [@rstacruz]( &nbsp;&middot;&nbsp;
> Twitter [@rstacruz](