Show Topics

Haml

Haml is a whitespace sensitive HTML templating language. Prepros compiles Haml files to .html by default. You can set output extension to .php in output options if you want to compile Haml files to PHP.

Configuring Haml

You can configure Haml from Project Settings -> HTML Tools -> Haml.

Change Output Destination

Click the output file path to manually change it or use project wide output options to adjust output path for all Haml files.

Double Quotes

You can use the Double Quotes option to quote HTML attributes with double quotes.

Minify HTML

Minify HTML option allows you to remove whitespace and comments from the output HTML file.

Imported Files

Prepros compiles the parent file whenever you edit an imported file. Prepros also re-scans imported files whenever you edit a file. Prepros doesn't support nested Haml imports. Refresh project with CTRL+R or CMD+R to manually re-scan imported files.

For instance if you have a file called a.haml with the following import.

%html
  %head
    title Haml Example
  %body
    .content
      = Haml::Engine.new(IO.read('b.haml')).render

Prepros will process a.haml whenever you edit b.haml.

Learn more about Haml from Haml website.