Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rstacruz/expug
Pug templates for Elixir
https://github.com/rstacruz/expug
elixir haml jade phoenix pug
Last synced: 29 days ago
JSON representation
Pug templates for Elixir
- Host: GitHub
- URL: https://github.com/rstacruz/expug
- Owner: rstacruz
- Created: 2016-06-11T22:54:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T10:51:59.000Z (about 7 years ago)
- Last Synced: 2024-10-01T06:35:12.623Z (about 1 month ago)
- Topics: elixir, haml, jade, phoenix, pug
- Language: Elixir
- Homepage: http://hexdocs.pm/expug
- Size: 724 KB
- Stars: 82
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Pug templates for Elixir. (Templating)
- fucking-awesome-elixir - expug - Pug templates for Elixir. (Templating)
- awesome-elixir - expug - Pug templates for Elixir. (Templating)
README
# Expug
> Indented shorthand HTML templates for Elixir
[![](https://img.shields.io/github/stars/rstacruz/expug.svg?style=social)](https://github.com/rstacruz/expug)
[![](https://img.shields.io/travis/rstacruz/expug.svg?branch=master)](https://travis-ci.org/rstacruz/expug "See test builds")Expug is a template language based on [Pug][] (formerly known as [Jade][]).
It lets you write HTML as indented shorthand, inspired by Haml, Slim, Pug/Jade, and so on.```jade
doctype html
html
meta(charset="utf-8")
title Hello, world!
body
a(href=@link)
| This is a link
```[Pug]: http://pugjs.org/
[Jade]: http://jade-lang.com/## Installation
Add expug to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:expug, "~> 0.9"}]
end
```Also see [phoenix_expug](https://github.com/rstacruz/phoenix_expug) for Phoenix integration.
## Syntax
Use CSS-like selectors for elements, and express your nesting through indentations.
```jade
ul.links
li
a(href="/") This is a link
```Read more: [Syntax](https://hexdocs.pm/expug/syntax.html)
## Why should I use it?
Read on [this comparison](https://hexdocs.pm/expug/prior_art.html) to see how Expug compares to other similar libraries.
## Thanks
**expug** © 2016-2017, Rico Sta. Cruz. Released under the [MIT] License.
Authored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).> [ricostacruz.com](http://ricostacruz.com) ·
> GitHub [@rstacruz](https://github.com/rstacruz) ·
> Twitter [@rstacruz](https://twitter.com/rstacruz)[MIT]: http://mit-license.org/
[contributors]: http://github.com/rstacruz/expug/contributors[![](https://img.shields.io/github/followers/rstacruz.svg?style=social&label=@rstacruz)](https://github.com/rstacruz)
[![](https://img.shields.io/twitter/follow/rstacruz.svg?style=social&label=@rstacruz)](https://twitter.com/rstacruz)