Within3 / liquid-blocks

Django-style template inheritance for the Liquid templating language

Home Page:https://rubygems.org/gems/liquid-blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Liquid Blocks

This gem adds Django-like block and extends tags to the Liquid templating language.

Usage

Add the following to your Gemfile

gem 'liquid-blocks'

And the following to your code

require 'liquid_blocks'

This allows you to have hello.liquid

{% extends 'layout' %}

{% block middle %}hello{% endblock %}

Which extends _layout.liquid

top

{% block middle %}middle{% endblock %}

bottom

Which renders into

top

hello

bottom

License

This work is licensed under the MIT License (see the LICENSE file).

Copyright © 2009 Dan Webb

About

Django-style template inheritance for the Liquid templating language

https://rubygems.org/gems/liquid-blocks

License:MIT License


Languages

Language:Ruby 100.0%