How to use best HTML abstraction markup language (Haml) easy

--

author @no___tea

Haml is my favorite tool to create HTML.

It accelerates and simplifies template creation down to veritable haiku.

Example

%section.container
%h1= post.title
%h2= post.subtitle
.content
= post.content

I prefer Haml rather than Slim because of its consistency. During more than 10 years of coding I’ve never met any case which Haml couldn’t solve elegant.

But there is just one thing. The main implementation of Haml is in Ruby, that’s why you must install it to use Haml.

I’ve created easy-to-use docker-image for Haml. It’s here.

How-to-use

Just pull image to your local environment

docker pull kalashnikovisme/haml-docker

and then run it

docker run --rm --volume "$PWD:/app" kalashnikovisme/haml-docker /app/YOUR_FILE.haml

You can find documentation at this Github repo.

Magic!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response