0.0
Low commit activity in last 3 years
No release in over a year
A Bridgetown plugin which provides support for Haml templates.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 3.0
~> 13.0

Runtime

>= 1.2.0.beta5, < 2.0
>= 6.0.0
 Project Readme

bridgetown-haml

Caution

This plugin has been marked deprecated and will no longer be recommended or officially maintained for Bridgetown 2.0+. We will still accept PRs if provided, but make no guarantee it won't break in future Bridgetown versions.


A Bridgetown plugin to provide support for Haml templates.

Installation for Bridgetown 1.2+

Run this command to add this plugin to your site's Gemfile:

$ bundle add bridgetown-haml

And then add the initializer to your configuration in config/initializers.rb:

init :"bridgetown-haml"

(For Bridgetown 1.1 or earlier, read these instructions.)

Usage

Simply name your page, layout, or partial with a .haml extension. The available features will be fairly analogous to the ERB support in Bridgetown, including support for helpers, partials, and rendering Liquid components. You can even embed Markdown and other template languages using standard Haml syntax.

You can also add template_engine: haml to your file's front matter and use any extension you want. For example, you could add data.xml to your source folder and simply make sure the front matter contains template_engine: haml.

Testing

  • Run bundle exec rspec to run the test suite
  • Or run script/cibuild to validate with Rubocop and test with rspec together.

Contributing

  1. Fork it (https://github.com/bridgetownrb/bridgetown-haml/fork)
  2. Clone the fork using git clone to your local development machine.
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request