Dang
https://github.com/veganstraightedge/dang
Description
Dang is a Ruby templating language. It uses angle brackets and CSS syntax. Somewhere between ERB and Haml.
Build Status
Features
- CSS selectors for HTML tags + attributes
- Not as noisy syntax than ERB
- Not quite as elegant as Haml
- No %s in your code
- More closers than Haml
- A lot is based on / inspired by Haml
Synopsis
Syntax
<b a simple bold tag b>
<div#id div with an id div>
<p.class lorem ipsum p>
<a[href=/] Home a>
<! html comment !>
<: non_printing(ruby) :>
<| printing(ruby) |>
!!!
doctype shorthand inspired by HAML
Usage
From the command line, transform a file of dang into html:
dang path/to/file.html.dang
Or just a snippet of dang into html:
dang -e "<i snippet i>"
Current Version
2.1.0
Requirements
For development:
Installation
Gemfile
Add this line to your application's Gemfile:
gem 'dang'
Manual
Or install it yourself as:
gem install dang
You may need to use sudo
to install it manually.
Developers
After checking out the source, run:
bundle
This will install any missing dependencies.
Authors
- Shane Becker / @veganstraightedge
- Evan Phoenix / @evanphx
Contributing
- Fork it
- Get it running
- Create your feature branch (
git checkout -b my-new-feature
) - Write your code and specs
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
If you find bugs, have feature requests or questions, please file an issue.
License
PUBLIC DOMAIN
Your heart is as free as the air you breathe.
The ground you stand on is liberated territory.
In legal text, Dang is dedicated to the public domain using Creative Commons -- CC0 1.0 Universal.