Project

opulent

0.0
No commit activity in last 3 years
No release in over 3 years
Opulent is a templating engine which strives to make page markup as beautiful and expressive as it should be. It's blazing fast, offers useful reusable component definitions and encourages well organised front end code. Opulent provides the cleanliness, readability and development speed you need for your project.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 1.3.0
 Project Readme

Opulent

Build Status

Opulent is a templating engine which strives to make page markup as beautiful and expressive as it should be. It's blazing fast, offers useful reusable component definitions and encourages well organised front end code. Opulent provides the cleanliness, readability and development speed you need for your project.

Syntax

Opulent has a beautiful, minimalistic syntax: no tags, indentation based, optional brackets, inline text, inline children and in page definitions.

Page Markup

html
  head
    title Opulent is Awesome
  body
    #content
      ul.list-inline
        li > a href="http://opulent.io" Opulent
        li > a href="http://github.com" GitHub

    footer |
      With Opulent, you can do anything.

Reusable Component

def hello(place)
  p Hello #{place}
  
hello place="World"
def content
  #content
    yield
  
content 
  h1 I'll replace yield!

Control Structures

ul.navbar
  if @user.logged_in?
    li Hello #{@user.name}
  else
    li > a href=link_to_register Sign Up

Elegant

Markup should beautiful and clean. Opulent makes markup a pleasant experience.

Reusable

Completely DRY, in opulent you can define reusable markup elements easily.

Full Featured

Everything you need, right from the start. Ready for all the major Ruby frameworks.

Performant

Opulent is lightweight, blazing fast. Performance is measured with every release.

Like it? There's so much more you can do with Opulent.

Read the Documentation

Installation

Install it yourself using the ruby gem:

$ gem install opulent

Or add this line to your application's Gemfile:

gem 'opulent'

And then execute:

$ bundle

Usage

Using Opulent to render a file is as easy as including it in your application and using the render method.

Read the Documentation

require 'opulent'

engine = Opulent.new(:index)
output = engine.render

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/opulent/opulent. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Production Ready

Opulent is production ready and has serious potential to becoming the next generation of Templating Engines for Ruby, therefore any contribution is more than welcome.

License

The gem is available as open source under the terms of the MIT License.